Skip to content

Commit

Permalink
Fix makefile targets for build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyvega committed Feb 3, 2021
1 parent 1b299cd commit 21ca92c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
coverage.html
coverage.txt
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ mocks:

.PHONY: build
build:
@go build $(GO_FLAGS) ./...
@mkdir -p build
@go build $(GO_FLAGS) -o build/priceproxy ./cmd/priceproxy

.PHONY: install
install:
Expand All @@ -52,18 +53,18 @@ install:
.PHONY: release-linux
release-linux:
@mkdir -p build
@env GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -v -o build/priceproxy-linux-amd64 $(GO_FLAGS)
@env GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -v -o build/priceproxy-linux-amd64 $(GO_FLAGS) ./cmd/priceproxy
@cd build && zip priceproxy-linux-amd64.zip priceproxy-linux-amd64

.PHONY: release-macos
release-macos:
@mkdir -p build
@env GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -v -o build/priceproxy-darwin-amd64 $(GO_FLAGS)
@env GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -v -o build/priceproxy-darwin-amd64 $(GO_FLAGS) ./cmd/priceproxy
@cd build && zip priceproxy-darwin-amd64.zip priceproxy-darwin-amd64

.PHONY: release-windows
release-windows:
@env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 go build -v -o build/priceproxy-amd64.exe $(GO_FLAGS)
@env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 go build -v -o build/priceproxy-amd64.exe $(GO_FLAGS) ./cmd/priceproxy
@cd build && 7z a -tzip priceproxy-windows-amd64.zip priceproxy-amd64.exe

.PHONY: lint
Expand Down

0 comments on commit 21ca92c

Please sign in to comment.