Skip to content

Commit

Permalink
fix broken build script (it relies on make tools)
Browse files Browse the repository at this point in the history
also removed `sudo` from `bash scripts/dish.sh` - I was able to build
dist on MacOS without it. Do we need it?
  • Loading branch information
melekes committed Jun 2, 2017
1 parent 016d7e5 commit 1f34535
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.swp
vendor
merkleeyes.db
build
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
all: test install
GOTOOLS = \
github.com/mitchellh/gox \
github.com/Masterminds/glide
PACKAGES=$(shell go list ./... | grep -v '/vendor/')

NOVENDOR = go list ./... | grep -v /vendor/
all: test install

build:
go build ./cmd/...
Expand All @@ -9,11 +12,11 @@ install:
go install ./cmd/...

dist:
@ sudo bash scripts/dist.sh

This comment has been minimized.

Copy link
@melekes

melekes Jun 2, 2017

Author Contributor

@ebuchman did you have some issues while building without sudo? I was able to build dist on MacOS without it

This comment has been minimized.

Copy link
@ebuchman

ebuchman Jun 2, 2017

Member

On linux, but yes cant build without it. As soon as ./build/ is created its owned by root, I think because its created inside the container. Let me try by moving the rm/mkdir to the dist.sh, so it doesnt happen in the container

This comment has been minimized.

Copy link
@ebuchman

ebuchman Jun 2, 2017

Member

solved!

@ bash scripts/publish.sh
@bash scripts/dist.sh
@bash scripts/publish.sh

test:
go test `${NOVENDOR}`
go test $(PACKAGES)
#go run tests/tendermint/*.go

get_deps:
Expand All @@ -22,14 +25,16 @@ get_deps:
update_deps:
go get -d -u ./...

get_vendor_deps:
go get github.com/Masterminds/glide
get_vendor_deps: tools
glide install

build-docker:
docker run -it --rm -v "$(PWD):/go/src/github.com/tendermint/basecoin" -w "/go/src/github.com/tendermint/basecoin" -e "CGO_ENABLED=0" golang:alpine go build ./cmd/basecoin
docker build -t "tendermint/basecoin" .

tools:
go get -u -v $(GOTOOLS)

clean:
@rm -f ./basecoin

Expand Down

0 comments on commit 1f34535

Please sign in to comment.