That, but it actually works this time

This commit is contained in:
Radon Rosborough 2021-07-10 19:30:08 +00:00
parent f8589c7ed4
commit a4651d2e40
1 changed files with 4 additions and 4 deletions

View File

@ -501,15 +501,15 @@ func main() {
name = blueName name = blueName
} }
dockerInspect := exec.Command( dockerInspect := exec.Command(
"docker", "inspect", name, "docker", "inspect", name, "-f",
`{{ index .Config.Labels "riju.deploy-config-hash" }}`, `{{ index .Config.Labels "riju.deploy-config-hash" }}`,
) )
dockerInspect.Stderr = os.Stderr dockerInspect.Stderr = os.Stderr
out, err := dockerInspect.Output() out, err := dockerInspect.Output()
if err != nil { if err != nil {
log.Fatalln(err) log.Println("got error while checking existing config hash:", err)
} deployCfgHash = "unknown"
if hash := strings.TrimSpace(string(out)); hash != "" { } else if hash := strings.TrimSpace(string(out)); hash != "" {
deployCfgHash = hash deployCfgHash = hash
} else { } else {
deployCfgHash = "unknown" deployCfgHash = "unknown"