From afa1ac4875f3af0d7c0b06b82d7bde579136940e Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Mon, 29 Jan 2018 13:40:11 +0100 Subject: [PATCH] win: fix #13 --- .travis.yml | 4 +++- Makefile | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 787a6aee..d6a49782 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile index ce12f2b6..6dba326c 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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))