diff --git a/Makefile b/Makefile index da44970..455f6ab 100644 --- a/Makefile +++ b/Makefile @@ -53,18 +53,20 @@ test-coverage: packages: for os in $(PKG_OS); do \ - cd $(BUILD_PATH); \ - mkdir -p $(ARTIFACTS_PATH)/$(PROJECT)_$${os}_$${arch}; \ - for cmd in $(COMMANDS); do \ - if [ -d "$${cmd}" ]; then \ - cd $${cmd}; \ - fi; \ - GOOS=$${os} GOARCH=$${arch} $(GOCMD) build -ldflags \ - "-X main.version=$(BRANCH) -X main.build=$(BUILD) -X main.commit=$(COMMIT)" \ - -o "$(ARTIFACTS_PATH)/$(PROJECT)_$${os}_$${arch}/`basename $${PWD}`" .; \ + for arch in $(PKG_ARCH); do \ cd $(BUILD_PATH); \ + mkdir -p $(ARTIFACTS_PATH)/$(PROJECT)_$${os}_$${arch}; \ + for cmd in $(COMMANDS); do \ + if [ -d "$${cmd}" ]; then \ + cd $${cmd}; \ + fi; \ + GOOS=$${os} GOARCH=$${arch} $(GOCMD) build -ldflags \ + "-X main.version=$(BRANCH) -X main.build=$(BUILD) -X main.commit=$(COMMIT)" \ + -o "$(ARTIFACTS_PATH)/$(PROJECT)_$${os}_$${arch}/`basename $${PWD}`" .; \ + cd $(BUILD_PATH); \ + done; \ + cd $(ARTIFACTS_PATH); \ + tar -cvzf $(PROJECT)_$(BRANCH)_$${os}_$${arch}.tgz $(PROJECT)_$${os}_$${arch}/; \ done; \ - cd $(ARTIFACTS_PATH); \ - tar cvzf $(PROJECT)_$(BRANCH)_$${os}_$${arch}.tgz $(PROJECT)_$${os}_$${arch}/; \ done; \