From 4b75184bc345e1048ab1a2f7122aab4596d20f26 Mon Sep 17 00:00:00 2001 From: Suyash Kumar Date: Wed, 26 Jun 2019 23:13:23 -0700 Subject: [PATCH] Update release make rule (#29) --- .dockerignore | 2 ++ Dockerfile | 2 +- Makefile | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..181546de --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +vendor +build diff --git a/Dockerfile b/Dockerfile index 06467f33..080b251b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM golang:alpine WORKDIR /go/src/github.com/suyashkumar/dicom COPY . . -RUN apk add --no-cache make git +RUN apk add --no-cache make git tar zip RUN go get github.com/golang/dep/cmd/dep RUN make diff --git a/Makefile b/Makefile index 67a4e3e6..26536f1f 100644 --- a/Makefile +++ b/Makefile @@ -26,3 +26,7 @@ release: GOOS=linux GOARCH=amd64 go build -o build/${BINARY}-linux-amd64 ./cmd/dicomutil; GOOS=darwin GOARCH=amd64 go build -o build/${BINARY}-darwin-amd64 ./cmd/dicomutil; GOOS=windows GOARCH=amd64 go build -o build/${BINARY}-windows-amd64.exe ./cmd/dicomutil; + cd build; \ + tar -zcvf ${BINARY}-linux-amd64.tar.gz ${BINARY}-linux-amd64; \ + tar -zcvf ${BINARY}-darwin-amd64.tar.gz ${BINARY}-darwin-amd64; \ + zip -r ${BINARY}-windows-amd64.exe.zip ${BINARY}-windows-amd64.exe;