diff --git a/Makefile b/Makefile index 3ce1c28..c2553aa 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ NAME := nolmandy +VERSION = $(shell gobump show -r) all: build @@ -6,6 +7,9 @@ setup: go get golang.org/x/vgo go get github.com/golang/lint/golint go get golang.org/x/tools/cmd/goimports + go get github.com/tcnksm/ghr + go get github.com/Songmu/goxz/cmd/goxz + go get github.com/motemen/gobump/cmd/gobump test: lint vgo test ./... @@ -25,3 +29,16 @@ build: clean: rm bin/$(NAME) +package: setup + @sh -c "'$(CURDIR)/scripts/package.sh'" + +crossbuild: setup + goxz -pv=v${VERSION} -build-ldflags="-X main.GitCommit=${COMMIT}" \ + -arch=386,amd64 -d=./pkg/dist/v${VERSION} \ + -n ${NAME} ./cmd/nolmandy + goxz -pv=v${VERSION} -build-ldflags="-X main.GitCommit=${COMMIT}" \ + -arch=386,amd64 -d=./pkg/dist/v${VERSION} \ + -n ${NAME}-server ./cmd/nolmandy-server + +release: package + ghr -u aktsk v${VERSION} ./pkg/dist/v${VERSION} diff --git a/version.go b/version.go new file mode 100644 index 0000000..310674e --- /dev/null +++ b/version.go @@ -0,0 +1,3 @@ +package main + +const version = "0.1.0"