mirror of
https://gitee.com/goploy/goploy.git
synced 2024-12-03 12:39:44 +08:00
F deploy script undefined
This commit is contained in:
parent
ad7f449a6e
commit
ed9bc2aaef
@ -316,7 +316,7 @@ func remoteSync(chInput chan<- syncMessage, userInfo model.User, project model.P
|
|||||||
ioutil.WriteFile(scriptName, []byte(replaceScriptVars(project.AfterDeployScript, project)), 0755)
|
ioutil.WriteFile(scriptName, []byte(replaceScriptVars(project.AfterDeployScript, project)), 0755)
|
||||||
}
|
}
|
||||||
rsyncOption, _ := utils.ParseCommandLine(project.RsyncOption)
|
rsyncOption, _ := utils.ParseCommandLine(project.RsyncOption)
|
||||||
rsyncOption = append([]string{"--exclude", "goploy-after-pull.sh"}, rsyncOption...)
|
rsyncOption = append([]string{"--exclude", "goploy-after-pull.sh", "--include", "goploy-after-deploy.sh"}, rsyncOption...)
|
||||||
rsyncOption = append(rsyncOption, "-e", "ssh -p "+strconv.Itoa(int(projectServer.ServerPort))+" -o StrictHostKeyChecking=no")
|
rsyncOption = append(rsyncOption, "-e", "ssh -p "+strconv.Itoa(int(projectServer.ServerPort))+" -o StrictHostKeyChecking=no")
|
||||||
if len(project.SymlinkPath) != 0 {
|
if len(project.SymlinkPath) != 0 {
|
||||||
destDir = path.Join(project.SymlinkPath, project.Name, project.LastPublishToken)
|
destDir = path.Join(project.SymlinkPath, project.Name, project.LastPublishToken)
|
||||||
@ -367,9 +367,9 @@ func remoteSync(chInput chan<- syncMessage, userInfo model.User, project model.P
|
|||||||
if len(project.AfterDeployScriptMode) != 0 {
|
if len(project.AfterDeployScriptMode) != 0 {
|
||||||
scriptMode = project.AfterDeployScriptMode
|
scriptMode = project.AfterDeployScriptMode
|
||||||
}
|
}
|
||||||
afterDeployScript := scriptMode + " " + path.Join(project.Path, "goploy-after-deploy."+utils.GetScriptExt(project.AfterDeployScriptMode))
|
afterDeployScriptPath := path.Join(project.Path, "goploy-after-deploy."+utils.GetScriptExt(project.AfterDeployScriptMode))
|
||||||
afterDeployCommands = append(afterDeployCommands, afterDeployScript)
|
afterDeployCommands = append(afterDeployCommands, scriptMode+" "+afterDeployScriptPath)
|
||||||
afterDeployCommands = append(afterDeployCommands, "rm -f "+afterDeployScript)
|
afterDeployCommands = append(afterDeployCommands, "rm -f "+afterDeployScriptPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// no symlink and deploy script
|
// no symlink and deploy script
|
||||||
|
Loading…
Reference in New Issue
Block a user