Skip to content

Commit

Permalink
add release command to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
nagiesek committed Jun 5, 2019
1 parent d13131c commit b2f5f99
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ DEV_ENV_CMD_IT := docker run -it ${DEV_ENV_OPTS} ${DEV_ENV_IMAGE}
DEV_CMD_RUN := docker run ${DEV_ENV_OPTS}

# Docker plugin image parameters.

VERSION ?= $(shell git describe --tags --always --dirty)

ENSURE_OUTPUTDIR_EXISTS := $(shell mkdir -p $(OUTPUTDIR))
Expand All @@ -44,7 +43,7 @@ dev:
# Clean all build artifacts.
.PHONY: clean
clean:
rm -rf $(OUTPUTDIR)
rm -rf $(OUTPUTDIR) release

$(OUTPUTDIR)/sdnbridge $(OUTPUTDIR)/sdnoverlay $(OUTPUTDIR)/nat : $(CNIFILES)
GOOS=windows GOARCH=amd64 go build -v -o $(OUTPUTDIR)/$(subst $(OUTPUTDIR)/,,$@).exe -ldflags "-X main.version=$(VERSION) -s -w" $(CNI_NET_DIR)/$(subst $(OUTPUTDIR)/,,$@)/*.go
Expand All @@ -56,3 +55,9 @@ test :
.PHONY : format
format :
gofmt -s -l -w ./common/* ./cni/* ./network/* ./plugins/* ./test/*

.PHONY : release
release : all
mkdir -p release; \
zip -jrmv release/windows-container-networking-cni-amd64-$(VERSION).zip out; \
for file in ./release/*.zip ; do shasum -a 512 $$file > $$file.sha512 ; done

0 comments on commit b2f5f99

Please sign in to comment.