Skip to content

Commit

Permalink
fix release commands
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstruck committed Jun 27, 2018
1 parent c03a6c1 commit 45cff5e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
17 changes: 9 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ builds:
env:
- CGO_ENABLED=0
flags:
- -tags "rocksdb"
- -tags
- rocksdb
ldflags: >
-X "github.com/bmeg/arachne/version.BuildDate=$(shell date)"
-X "github.com/bmeg/arachne/version.GitCommit= $(git_commit)"
-X "github.com/bmeg/arachne/version.GitBranch=$(git_branch)"
-X "github.com/bmeg/arachne/version.GitUpstream=$(git_upstream)"
-X "github.com/bmeg/arachne/version.Version={{.Version}}"
-X github.com/bmeg/arachne/version.BuildDate={{.Date}}
-X github.com/bmeg/arachne/version.GitCommit={{.Commit}}
-X github.com/bmeg/arachne/version.GitBranch={{.Env.GIT_BRANCH}}
-X github.com/bmeg/arachne/version.GitUpstream={{.Env.GIT_UPSTREAM}}
-X github.com/bmeg/arachne/version.Version={{.Version}}
dist: build/release

Expand All @@ -29,7 +30,7 @@ env_files:

archive:
format: tar.gz
name_template: {{.ProjectName}}-{{.Os}}-{{.Arch}}-{{.Version}}
name_template: "{{.ProjectName}}-{{.Os}}-{{.Arch}}-{{.Version}}"

snapshot:
name_template: SNAPSHOT-{{.Commit}}
name_template: "SNAPSHOT-{{.Commit}}"
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
SHELL=/bin/bash

TESTS=$(shell go list ./... | grep -v /vendor/)

git_commit := $(shell git rev-parse --short HEAD)
git_branch := $(shell git symbolic-ref -q --short HEAD)
git_upstream := $(shell git remote get-url $(shell git config branch.$(shell git symbolic-ref -q --short HEAD).remote) 2> /dev/null)

export GIT_BRANCH = $(git_branch)
export GIT_UPSTREAM = $(git_upstream)

VERSION_LDFLAGS=\
-X "github.com/bmeg/arachne/version.BuildDate=$(shell date)" \
-X "github.com/bmeg/arachne/version.GitCommit= $(git_commit)" \
-X "github.com/bmeg/arachne/version.GitCommit=$(git_commit)" \
-X "github.com/bmeg/arachne/version.GitBranch=$(git_branch)" \
-X "github.com/bmeg/arachne/version.GitUpstream=$(git_upstream)"

export ARACHNE_VERSION = 0.2.0
# LAST_PR_NUMBER is used by the release notes builder to generate notes
# based on pull requests (PR) up until the last release.
export LAST_PR_NUMBER = 120
export LAST_PR_NUMBER = 125

# ---------------------
# Compile and Install
Expand All @@ -31,7 +36,7 @@ depends:

# Build the code including the rocksdb package
with-rocksdb: depends
@go install -tags 'rocksdb' .
@go install -tags 'rocksdb' -ldflags '$(VERSION_LDFLAGS)' .

# --------------------------
# Complile Protobuf Schemas
Expand Down
1 change: 1 addition & 0 deletions rocksdb/rocks.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build rocksdb
// +build linux,darwin,!cgo

/*
The KeyValue interface wrapper for RocksDB
Expand Down

0 comments on commit 45cff5e

Please sign in to comment.