Skip to content

Commit

Permalink
Workaround to go install in Makefile. Cannot get install working with…
Browse files Browse the repository at this point in the history
… sudo install.sh
  • Loading branch information
joelillo committed Feb 23, 2017
1 parent 7809224 commit ec14f28
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
PKG := github.com/ocmdev/rita
VERSION := $(shell git describe --always --long --dirty)
GOPATH := $(GOPATH)
BINARY := rita

LDFLAGS=-ldflags="-X github.com/ocmdev/rita/config.VERSION=${VERSION}"


default:
go get
go build -ldflags="-X github.com/ocmdev/rita/config.VERSION=${VERSION}"
go build ${LDFLAGS}

# Having issues with 'go install' + LDFLAGS using sudo and the
# install script. This is a workaround.
install:
go install -ldflags="-X github.com/ocmdev/rita/config.VERSION=${VERSION}"
go get
go build ${LDFLAGS} -o ${GOPATH}/bin/${BINARY}

0 comments on commit ec14f28

Please sign in to comment.