From fb48a3ef1d750f78ea8c36f18b0c8e95b2db6d2e Mon Sep 17 00:00:00 2001 From: adamstruck Date: Wed, 30 May 2018 11:17:58 -0700 Subject: [PATCH 1/2] add version info when running 'make install' --- Makefile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 148c07835..91baa6b8a 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,8 @@ -ifndef GOPATH -$(error GOPATH is not set) -endif - TESTS=$(shell go list ./... | grep -v /vendor/ | grep -v github-release-notes) -export SHELL=/bin/bash -PATH := ${PATH}:${GOPATH}/bin -export PATH - PROTO_INC=-I ./ -I $(shell pwd)/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis +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) @@ -21,10 +14,16 @@ export FUNNEL_VERSION=0.7.0 # based on pull requests (PR) up until the last release. export LAST_PR_NUMBER = 521 +VERSION_LDFLAGS=\ + -X "github.com/ohsu-comp-bio/funnel/version.BuildDate=$(shell date)" \ + -X "github.com/ohsu-comp-bio/funnel/version.GitCommit= $(git_commit)" \ + -X "github.com/ohsu-comp-bio/funnel/version.GitBranch=$(git_branch)" \ + -X "github.com/ohsu-comp-bio/funnel/version.GitUpstream=$(git_upstream)" + # Build the code install: depends @touch version/version.go - @go install github.com/ohsu-comp-bio/funnel + @go install -ldflags '$(VERSION_LDFLAGS)' github.com/ohsu-comp-bio/funnel # Generate the protobuf/gRPC code proto: From 5adaef8687a769cabba05b345b4741279c253023 Mon Sep 17 00:00:00 2001 From: adamstruck Date: Wed, 30 May 2018 11:42:47 -0700 Subject: [PATCH 2/2] update dependencies; cleanup --- Gopkg.lock | 14 +------------- Gopkg.toml | 4 ---- Makefile | 2 +- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 442d75778..f06191021 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -300,18 +300,6 @@ packages = ["."] revision = "2e65f85255dbc3072edf28d6b5b8efc472979f5a" -[[projects]] - name = "github.com/google/go-github" - packages = ["github"] - revision = "e48060a28fac52d0f1cb758bc8b87c07bac4a87d" - version = "v15.0.0" - -[[projects]] - branch = "master" - name = "github.com/google/go-querystring" - packages = ["query"] - revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a" - [[projects]] name = "github.com/googleapis/gax-go" packages = ["."] @@ -762,6 +750,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "9424b6c5871f27a4e88cfd719b8092c5e0d17a1622337ab3c7b46cda7af5375a" + inputs-digest = "ea4403962800436ec433ab6351189bbc09a664ad175b6e78d09a3a84c695af1d" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index eaae56c85..511a1f3c0 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -93,10 +93,6 @@ name = "github.com/golang/protobuf" version = "1.1.0" -[[constraint]] - name = "github.com/google/go-github" - version = "15.0.0" - [[constraint]] name = "github.com/grpc-ecosystem/go-grpc-middleware" version = "1.0.0" diff --git a/Makefile b/Makefile index 91baa6b8a..dbfd05786 100644 --- a/Makefile +++ b/Makefile @@ -207,7 +207,7 @@ bundle-examples: @gofmt -w -s examples/internal/bundle.go config/internal/bundle.go # Make everything usually needed to prepare for a pull request -full: proto install prune_deps add_deps tidy lint test website webdash +full: proto install tidy lint test website webdash # Build the website website: