Skip to content

Commit

Permalink
Makefile: use goreleaser for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ekalinin committed Feb 3, 2023
1 parent f6d920e commit 35105dc
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,10 @@ build: clean lint
test: clean lint
@go test -cover -o ${EXEC}

release: test buildall
@git tag `grep "version" main.go | grep -o -E '[0-9]\.[0-9]\.[0-9]{1,2}'`
release: test
@git tag v`grep "\tVersion" internals.go | grep -o -E '[0-9]\.[0-9]\.[0-9]{1,2}'`
@git push --tags origin master

buildall: clean
@mkdir -p ${BUILD_DIR}
@for os in "${BUILD_OS}" ; do \
for arch in "${BUILD_ARCH}" ; do \
echo " * build $$os for $$arch"; \
GOOS=$$os GOARCH=$$arch go build -o ${BUILD_DIR}/${EXEC} ${CMD_SRC}; \
cd ${BUILD_DIR}; \
tar czf ${EXEC}.$$os.$$arch.tgz ${EXEC}; \
cd - ; \
done done
@rm ${BUILD_DIR}/${EXEC}
release-local:
@goreleaser check
@goreleaser release --snapshot --clean

0 comments on commit 35105dc

Please sign in to comment.