Skip to content

Commit

Permalink
Merge pull request #591 from nanobox-io/bugfix/584
Browse files Browse the repository at this point in the history
Only pull 'nanobox/' images on 'update-images'
  • Loading branch information
glinton authored Sep 26, 2017
2 parents a594af8 + 356e3a9 commit ce63663
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions processors/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package processors

import (
"strings"
"time"

"github.com/jcelliott/lumber"
Expand All @@ -20,9 +21,6 @@ func Update() error {
return util.ErrorAppend(err, "failed to init docker client")
}

// // check to see if nanobox needs to update
// update.Check()

// update all the nanobox images
if err := pullImages(); err != nil {
return util.ErrorAppend(err, "failed to pull images")
Expand All @@ -44,12 +42,14 @@ func pullImages() error {
if image.Slug == "" {
continue
}
if !strings.Contains(image.Slug, "nanobox/") {
continue
}
display.StartTask("Pulling %s image", image.Slug)

// generate a docker percent display
dockerPercent := &display.DockerPercentDisplay{
Output: display.NewStreamer("info"),
// Prefix: buildImage,
}

// pull the build image
Expand Down
4 changes: 3 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ printf "\nBuilding nanobox updater...\n"
# change into updater directory and build nanobox updater
cd ./updater && gox -osarch "darwin/amd64 linux/amd64 windows/amd64" -ldflags="-s" -output="../.build/v2/{{.OS}}/{{.Arch}}/nanobox-update"

cd ..

printf "\nCompacting binaries...\n"
upx ./.build/v2/darwin/amd64/nanobox-update ./.build/v2/darwin/amd64/nanobox ./.build/v2/windows/amd64/nanobox-update.exe ./.build/v2/windows/amd64/nanobox.exe ./.build/v2/linux/amd64/nanobox-update ./.build/v2/linux/amd64/nanobox
upx ./.build/v2/*/amd64/nanobox*
2 changes: 1 addition & 1 deletion util/odin/odin.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func doRequest(method, path string, params url.Values, requestBody, responseBody
}

if res.StatusCode < 200 || res.StatusCode >= 300 {
return util.ErrorfQuiet("[ODIN] bad exit response(%d %s %s %s (%s) %s)", res.StatusCode, req.Method, req.URL, req.Proto, res.Header.Get("Content-Length"), b)
return util.ErrorfQuiet("[ODIN] bad exit response(%d %s %s %s (%s) %s)", res.StatusCode, req.Method, strings.Replace(req.URL.String(), auth.Key, "REDACTED", -1), req.Proto, res.Header.Get("Content-Length"), b)
}

if responseBody != nil {
Expand Down

0 comments on commit ce63663

Please sign in to comment.