Skip to content

Commit

Permalink
Release version 0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
danlamanna committed Sep 10, 2019
1 parent 029e1e2 commit 1dcda68
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BIN_NAME=rivet
VERSION := $(shell grep "const Version " version/version.go | sed -E 's/.*"(.+)"$$/\1/')
GIT_COMMIT=$(shell git rev-parse HEAD)
GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "-dirty" || true)
BUILD_DATE=$(shell date '+%Y-%m-%d-%H:%M:%S')
BUILD_DATE=$(shell date --utc '+%Y-%m-%d-%H:%M:%S')

default: test

Expand All @@ -22,14 +22,12 @@ build:
@echo "building ${BIN_NAME} ${VERSION}"
@echo "GOPATH=${GOPATH}"
mkdir -p bin
GOOS=darwin GOARCH=amd64 go build -race \
-ldflags "-X github.com/danlamanna/rivet/version.GitCommit=${GIT_COMMIT}${GIT_DIRTY}" \
-ldflags "-X github.com/danlamanna/rivet/version.BuildDate=${BUILD_DATE}" \
GOOS=darwin GOARCH=amd64 go build \
-ldflags "-X github.com/danlamanna/rivet/version.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -X github.com/danlamanna/rivet/version.BuildDate=${BUILD_DATE}" \
-gcflags "all=-trimpath=${GOPATH}" \
-o bin/${BIN_NAME}-darwin
GOOS=linux GOARCH=amd64 go build \
-ldflags "-X github.com/danlamanna/rivet/version.GitCommit=${GIT_COMMIT}${GIT_DIRTY}" \
-ldflags "-X github.com/danlamanna/rivet/version.BuildDate=${BUILD_DATE}" \
-ldflags "-X github.com/danlamanna/rivet/version.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -X github.com/danlamanna/rivet/version.BuildDate=${BUILD_DATE}" \
-gcflags "all=-trimpath=${GOPATH}" \
-o bin/${BIN_NAME}-linux

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ a tiny cli for syncing a directory with a girder instance

## mac
```
sudo curl -sL -o /usr/local/bin/rivet https://github.com/danlamanna/rivet/releases/download/v0.0.3/rivet-0.0.3-darwin-amd64
sudo curl -sL -o /usr/local/bin/rivet https://github.com/danlamanna/rivet/releases/download/v0.0.4/rivet-0.0.4-darwin-amd64
sudo chmod +x /usr/local/bin/rivet
```

## linux
```
sudo curl -sL -o /usr/local/bin/rivet https://github.com/danlamanna/rivet/releases/download/v0.0.3/rivet-0.0.3-linux-amd64
sudo curl -sL -o /usr/local/bin/rivet https://github.com/danlamanna/rivet/releases/download/v0.0.4/rivet-0.0.4-linux-amd64
sudo chmod +x /usr/local/bin/rivet
```

Expand Down
2 changes: 1 addition & 1 deletion make-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION=0.0.3
VERSION=0.0.4
GIT_VERSION=$(git describe --always --long --dirty)

GOOS=darwin GOARCH=amd64 go build -ldflags="-X main.version=$GIT_VERSION" -gcflags "all=-trimpath=/Users/dan/go" -o rivet-$VERSION-darwin-amd64
Expand Down
5 changes: 2 additions & 3 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ import (
"github.com/hashicorp/go-version"
)

var GitCommit string

const Version = "0.0.3"
const Version = "0.0.4"

var BuildDate = ""
var GitCommit = ""
var GoVersion = runtime.Version()
var OsArch = fmt.Sprintf("%s %s", runtime.GOOS, runtime.GOARCH)

Expand Down

0 comments on commit 1dcda68

Please sign in to comment.