mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 11:48:13 +01:00
Add make tasks for releasing
This commit is contained in:
13
Makefile
13
Makefile
@@ -1,6 +1,7 @@
|
|||||||
|
VERSION = $(shell grep Version version.go | awk -F '"' '{print $$2}')
|
||||||
COMMIT = $(shell git rev-parse --short HEAD)
|
COMMIT = $(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
.PHONY: build test deps fmt fmtdiff travis gox
|
.PHONY: build test deps fmt fmtdiff travis gox tag push release
|
||||||
|
|
||||||
build: test
|
build: test
|
||||||
go build -o bin/asciinema -ldflags "-X main.GitCommit $(COMMIT)"
|
go build -o bin/asciinema -ldflags "-X main.GitCommit $(COMMIT)"
|
||||||
@@ -21,3 +22,13 @@ travis: build fmtdiff
|
|||||||
|
|
||||||
gox:
|
gox:
|
||||||
gox -os="darwin linux" -arch="386 amd64" -output="bin/asciinema_{{.OS}}_{{.Arch}}" -ldflags "-X main.GitCommit $(COMMIT)"
|
gox -os="darwin linux" -arch="386 amd64" -output="bin/asciinema_{{.OS}}_{{.Arch}}" -ldflags "-X main.GitCommit $(COMMIT)"
|
||||||
|
|
||||||
|
tag:
|
||||||
|
git tag | grep "v$(VERSION)" && echo "Tag v$(VERSION) exists" && exit 1 || true
|
||||||
|
git tag -s -m "Releasing $(VERSION)" v$(VERSION)
|
||||||
|
git push --tags
|
||||||
|
|
||||||
|
push:
|
||||||
|
echo "TODO: uploading binaries to github release"
|
||||||
|
|
||||||
|
release: test tag push
|
||||||
|
|||||||
Reference in New Issue
Block a user