Skip to content

Commit

Permalink
Merge pull request #15 from aktsk/versioning-and-releasing
Browse files Browse the repository at this point in the history
Versioning and releasing
  • Loading branch information
mizzy authored Apr 16, 2018
2 parents 66804e1 + de8c9c6 commit ac0ae19
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
NAME := nolmandy
VERSION = $(shell gobump show -r)

all: build

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 ./...
Expand All @@ -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}
3 changes: 3 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package main

const version = "0.1.0"

0 comments on commit ac0ae19

Please sign in to comment.