Skip to content

Commit

Permalink
releases
Browse files Browse the repository at this point in the history
* linux-only binary release
* docker releases

fixes #32
  • Loading branch information
boz committed Mar 28, 2018
1 parent d219606 commit e8aa5ab
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See documentation at http://goreleaser.com
builds:

- binary: akash
main: ./cmd/akash
goarch: [amd64]
goos: [linux]
ldflags: -s -w -X github.com/ovrclk/akash/version.version={{.Version}} -X github.com/ovrclk/akash/version.commit={{.Commit}} -X github.com/ovrclk/akash/version.date={{.Date}}

- binary: akashd
main: ./cmd/akashd
goarch: [amd64]
goos: [linux]
ldflags: -s -w -X github.com/ovrclk/akash/version.version={{.Version}} -X github.com/ovrclk/akash/version.commit={{.Commit}} -X github.com/ovrclk/akash/version.date={{.Date}}

archive:
files:
- none*

release:
github:
owner: ovrclk
name: akash
prerelease: true
draft: false
21 changes: 19 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: go
sudo: false

git:
depth: 5
depth: 50

env:
global:
Expand All @@ -12,6 +12,8 @@ env:
stages:
- test
- image
- test-skipped
- release

jobs:
include:
Expand Down Expand Up @@ -57,7 +59,7 @@ jobs:
- name: image
os: linux
go: "1.10"
sudo: required
services: [docker]
script:
- make image
if: type = cron
Expand All @@ -71,6 +73,21 @@ jobs:
- go test -v -count=1 $(glide novendor)
if: type = cron

- name: release
os: linux
go: "1.10"
services: [docker]
script:
- docker build --rm -t ovrclk/akash .
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker tag ovrclk/akash "ovrclk/akash:$TRAVIS_TAG"
- docker push "ovrclk/akash:$TRAVIS_TAG"
- docker tag ovrclk/akash ovrclk/akash:latest
- docker push ovrclk/akash:latest
- go get github.com/goreleaser/goreleaser
- $GOPATH/bin/goreleaser
if: tag =~ ^v AND fork = false

matrix:
allow_failures:
- env: TEST_UNSKIP=true
Expand Down
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (app *app) ActivateMarket(actor market.Actor, bus *tmtmtypes.EventBus) erro
func (app *app) Info(req tmtypes.RequestInfo) tmtypes.ResponseInfo {
return tmtypes.ResponseInfo{
Data: "{}",
Version: version.Version,
Version: version.Version(),
LastBlockHeight: int64(app.state.Version()),
LastBlockAppHash: app.state.Hash(),
}
Expand Down
18 changes: 16 additions & 2 deletions version/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
package version

const (
Version = "0.0.1"
var (
version = "master"
commit = ""
date = ""
)

func Version() string {
return version
}

func Commit() string {
return commit
}

func Date() string {
return date
}

0 comments on commit e8aa5ab

Please sign in to comment.