Skip to content

Commit

Permalink
win: fix #13
Browse files Browse the repository at this point in the history
  • Loading branch information
fenollp committed Jan 29, 2018
1 parent 8045a5c commit afa1ac4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ script:
- go vet $(go list ./... | grep -v /vendor/)
- megacheck -show-ignored -unused.exported
#- go test -v -race .
- make x
- OSARCH=linux/amd64 make x
- '[[ 0 -eq $(git --no-pager diff --name-only | wc -l) ]]'
- ./monkey-Linux-x86_64 -h | grep monkey
- ./monkey-Linux-x86_64 --help | grep monkey
- ./monkey-Linux-x86_64 -V | grep monkey/$CURRENT_TAG
- ./monkey-Linux-x86_64 --version | grep monkey/$CURRENT_TAG
- make x
- '[[ 0 -eq $(git --no-pager diff --name-only | wc -l) ]]'
- make image
- docker tag monkey fuzzymonkey/monkey:$CURRENT_TAG
- docker tag monkey fuzzymonkey/monkey:latest
Expand Down
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
.PHONY: all update debug lint x test

EXE = monkey
OS ?= linux darwin windows
ARCH ?= amd64
OSARCH ?= \
windows/386 windows/amd64 \
darwin/386 darwin/amd64 \
linux/386 linux/amd64 linux/arm linux/arm64 linux/mips linux/mipsle \
freebsd/386 freebsd/amd64 freebsd/arm \
netbsd/386 netbsd/amd64 netbsd/arm \
openbsd/386 openbsd/amd64 \
plan9/386 plan9/amd64 \
solaris/amd64
SHA = sha256.txt
FMT = $(EXE)-{{.OSUname}}-{{.ArchUname}}
LNX = $(EXE)-Linux-x86_64
Expand All @@ -18,7 +25,7 @@ all: lint vendor
x: vendor
$(if $(wildcard $(EXE)-*-*.$(SHA)),rm $(EXE)-*-*.$(SHA))
go generate
CGO_ENABLED=0 gox -os '$(OS)' -arch '$(ARCH)' -output '$(DST)/$(FMT)' -ldflags '-s -w' -verbose .
CGO_ENABLED=0 gox -output '$(DST)/$(FMT)' -ldflags '-s -w' -verbose -osarch "$$(echo $(OSARCH))" .
cd $(DST) && for bin in $(EXE)-*; do sha256sum $$bin | tee $$bin.$(SHA); done
$(if $(filter-out .,$(DST)),,sha256sum --check --strict *$(SHA))

Expand Down

0 comments on commit afa1ac4

Please sign in to comment.