Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment Running Command Handling #93

Merged
merged 11 commits into from
Dec 14, 2023
4 changes: 2 additions & 2 deletions deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
}

defer func() error {
if err := file.Close(); err != nil {

Check warning on line 277 in deploy.go

View workflow job for this annotation

GitHub Actions / golangci-lint

if-return: redundant if ...; err != nil check, just return error instead. (revive)
return err
}
return nil
Expand Down Expand Up @@ -377,7 +377,7 @@
return packageParam, httpRespError
}

responseString, error := extractString(httpResp)

Check warning on line 380 in deploy.go

View workflow job for this annotation

GitHub Actions / golangci-lint

redefines-builtin-id: redefinition of the built-in type error (revive)
if error != nil {
return packageParam, fmt.Errorf("Error Extracting Response: %s", error)
}
Expand Down Expand Up @@ -423,7 +423,7 @@
return &gatewayResponse, httpRespError
}

responseString, error := extractString(httpResp)

Check warning on line 426 in deploy.go

View workflow job for this annotation

GitHub Actions / golangci-lint

redefines-builtin-id: redefinition of the built-in type error (revive)
if error != nil {
return &gatewayResponse, fmt.Errorf("Error Extracting Response: %s", error)
}
Expand Down Expand Up @@ -485,7 +485,7 @@
return &gatewayResponse, httpRespError
}

responseString, error := extractString(httpResp)

Check warning on line 488 in deploy.go

View workflow job for this annotation

GitHub Actions / golangci-lint

redefines-builtin-id: redefinition of the built-in type error (revive)
if error != nil {
return &gatewayResponse, fmt.Errorf("Error Extracting Response: %s", error)
}
Expand Down Expand Up @@ -556,7 +556,7 @@
return &gatewayResponse, httpRespError
}

responseString, error := extractString(httpResp)

Check warning on line 559 in deploy.go

View workflow job for this annotation

GitHub Actions / golangci-lint

redefines-builtin-id: redefinition of the built-in type error (revive)
if error != nil {
return &gatewayResponse, fmt.Errorf("Error Extracting Response: %s", error)
}
Expand Down Expand Up @@ -608,7 +608,7 @@
u, _ := url.Parse(gc.host + "/im/types/Configuration/actions/install")
q := u.Query()

if gc.version == "4.0" {
if gc.version == "4.0" && !expansion {
q.Set("noSecurityBootstrap", "false")
} else {
q.Set("noUpload", "false")
Expand Down Expand Up @@ -994,7 +994,7 @@

for _, mdmQueueCommandDetail := range mdmQueueCommandDetails {

if currentPhase == mdmQueueCommandDetail.AllowedPhase && mdmQueueCommandDetail.CommandState == "pending" {
if currentPhase == mdmQueueCommandDetail.AllowedPhase && (mdmQueueCommandDetail.CommandState == "pending" || mdmQueueCommandDetail.CommandState == "running") {
checkCompleted = "Running"
break
} else if currentPhase == mdmQueueCommandDetail.AllowedPhase && mdmQueueCommandDetail.CommandState == "failed" {
Expand Down
Loading