Skip to content

Commit

Permalink
Merge pull request #51 from netlify/update-makefile
Browse files Browse the repository at this point in the history
update to have release parts
  • Loading branch information
rybit authored Jul 3, 2017
2 parents ebc546e + 4adefe9 commit 1dadc31
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@ help: ## Show this help.

all: test build ## Run the tests and build the binary.

build: ## Build the binary.
go build -ldflags "-X github.com/netlify/gocommerce/cmd.Version=`git rev-parse HEAD`"
os = darwin
arch = amd64

build: test
@echo "Making gocommerce for $(os)/$(arch)"
GOOS=$(os) GOARCH=$(arch) go build -ldflags "-X github.com/netlify/gocommerce/cmd.Version=`git rev-parse HEAD`"

build_linux: override os=linux
build_linux: build

package: build
tar -czf gocommerce-$(os)-$(arch).tar.gz gocommerce

package_linux: override os=linux
package_linux: package

deps: ## Install dependencies.
@go get -u github.com/golang/lint/golint
Expand Down

0 comments on commit 1dadc31

Please sign in to comment.