Skip to content

Commit

Permalink
chore: sort out version name for release
Browse files Browse the repository at this point in the history
  • Loading branch information
foamzou committed Mar 13, 2022
1 parent 8a08ae4 commit a9a8c8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions LATEST_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.2
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
BINARY_NAME=media-get
MAC_BIN=.release/${BINARY_NAME}-darwin
LINUX_BIN=.release/${BINARY_NAME}-linux
WIN_BIN=.release/${BINARY_NAME}-win
VERSION_NAME := $(shell grep "BuildName" version/version.go | head -n1 | awk -F'"' '{print $$2}')

MAC_BIN=.release/${BINARY_NAME}-${VERSION_NAME}-darwin
LINUX_BIN=.release/${BINARY_NAME}-${VERSION_NAME}-linux
WIN_BIN=.release/${BINARY_NAME}-${VERSION_NAME}-win.exe

release:
@printf "${VERSION_NAME}" > ./LATEST_VERSION
mkdir -p .release
CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -ldflags "-s -w" -o ${MAC_BIN} main.go
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags "-s -w" -o ${LINUX_BIN} main.go
Expand Down

0 comments on commit a9a8c8a

Please sign in to comment.