Skip to content

Commit

Permalink
Set automatic releases uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed May 13, 2017
1 parent 7aa7fe5 commit 8deb614
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
*.coverprofile

.idea/
build/
dist/
vendor/
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ script:
- make lint
- make test
- make coveralls

before_deploy:
- make build
deploy:
provider: releases
api_key:
secure: "TWkwRVQlBG5/BA0QKNcqZNHnWDJwAkfPPPzJdwhEUk0KdLPXc6WFk07wZsg/Q1OmO5+zzAqHLLNfwjAx/Xr6yi+d2+dYqsmAVfHOorU6PC+FdlANCvyHJ+z71pLSu1u/cOrc3DLtHDV8MhA9bbsD+RKqYU/8e/4yLKcpQ8NDuusNupDbyaKEMQRIpBw5k2oCUxayjVXurRNfG9RQA0R1ZGb8k6mxJMqjzV0gR3b5p598MDnN8wsKtt6OVQ/86UQ9pzJKJyhP7F2FQd8+kkz6KSKotlbxaMTK9PNMpFiCBPzgaYI74VkL15sgbq2n65AbD/Lxov2KGz5gZrNzZiUiw1FEdxOFhzmPaC+5J4zkHbBnn/gWAzfEmozWzkEODFuNG4gKj3MYXxAe3e+0frow54r8XiyhFnjMoCe9iH879zKMbDj5OF+9Kn+YAQBpCVa9SccyY1UMjRlLWUGCu9si6YrseJZ+REqPw7gbI1LmE6Z/jqM1JAmKT83U9RCqRWYvvR783YOTG8mIWoONrHpiipPd+HVnRAX11bVWRJQKGOYv3oz0g/QB/cHkrM/4g2uxPyRlaj+8DNVVsrsxeOZY41CJ2OFFwhC2c0tihuk/jk1NigLCUTmFhMPuyCKKAPgxEQDyrL8e45PxExU/qklBpzPecWUtX9fx+Roz5XU/VKI="
file_glob: true
file: dist/*
skip_cleanup: true
on:
tags: true
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
PROJECT := github.com/VodkaBears/yaspell
VERSION := $(shell git describe --tags --abbrev=0)
VERSION_FLAG := $(PROJECT)/config.version=$(VERSION)
DIST_FOLDER := dist

.PHONY: githooks
githooks:
cp -f githooks/* .git/hooks/
Expand All @@ -18,26 +23,25 @@ lint:

.PHONY: test
test:
go test -cover ./...
go test -ldflags "-X ${VERSION_FLAG}" -cover ./...

.PHONY: cover
cover:
go-carpet

.PHONY: clean
clean:
rm -rf build
rm -rf ${DIST_FOLDER}

.PHONY: build
build: clean
mkdir build
gox -os="linux darwin windows" -arch="386 amd64" -output="build/{{.Dir}}_{{.OS}}_{{.Arch}}" ./...
gox -ldflags "-X ${VERSION_FLAG}" -os="linux darwin windows" -arch="386 amd64" -output="${DIST_FOLDER}/{{.Dir}}_{{.OS}}_{{.Arch}}" ./...

.PHONY: run
run:
go run *.go ${ARGS}
go run -ldflags "-X ${VERSION_FLAG}" *.go ${ARGS}

.PHONY: coveralls
coveralls:
overalls -project=github.com/VodkaBears/yaspell -covermode=count
overalls -project=$(PROJECT) -covermode=count
goveralls -coverprofile=overalls.coverprofile -service=travis-ci -repotoken 2zEPspDOcwDzRYBKbDmjk846HOf4ugxlO
4 changes: 2 additions & 2 deletions config/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
)

// App version
const version = "0.0.1"
// App version. Linking externally.
var version = "0.0.0"

// Version implements flag.Value interface to show the version
type Version bool
Expand Down

0 comments on commit 8deb614

Please sign in to comment.