Skip to content

Commit

Permalink
:p: Build monova for darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnjack committed Jun 12, 2022
1 parent aae69b2 commit 6d72b96
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@ else
override VERSION="$(shell test -f monova && ./monova || echo 0.0.0)"
endif

build: version
build: ${BINARY} dist/monova_linux_amd64 dist/monova_darwin_amd64

${BINARY}: version
go build -ldflags="-X main.version=${VERSION}"


dist/monova_linux_amd64: version *.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-X main.version=${VERSION}" -o dist/monova_linux_amd64

dist/monova_darwin_amd64: version *.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-X main.version=${VERSION}" -o dist/monova_darwin_amd64

run: build
./${BINARY}

release: build
grm release jsnjack/monova -f ${BINARY} -t "v`monova`"
tar --transform='s,_.*,,' --transform='s,dist/,,' -cz -f dist/${BINARY}_linux_amd64.tar.gz dist/${BINARY}_linux_amd64
tar --transform='s,_.*,,' --transform='s,dist/,,' -cz -f dist/${BINARY}_darwin_amd64.tar.gz dist/${BINARY}_darwin_amd64
grm release jsnjack/${BINARY} -f dist/${BINARY}_linux_amd64.tar.gz -f dist/${BINARY}_darwin_amd64.tar.gz -t "v`monova`"

0 comments on commit 6d72b96

Please sign in to comment.