Skip to content

Commit b2f5f99

Browse files
committed
add release command to makefile
1 parent d13131c commit b2f5f99

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ DEV_ENV_CMD_IT := docker run -it ${DEV_ENV_OPTS} ${DEV_ENV_IMAGE}
2424
DEV_CMD_RUN := docker run ${DEV_ENV_OPTS}
2525

2626
# Docker plugin image parameters.
27-
2827
VERSION ?= $(shell git describe --tags --always --dirty)
2928

3029
ENSURE_OUTPUTDIR_EXISTS := $(shell mkdir -p $(OUTPUTDIR))
@@ -44,7 +43,7 @@ dev:
4443
# Clean all build artifacts.
4544
.PHONY: clean
4645
clean:
47-
rm -rf $(OUTPUTDIR)
46+
rm -rf $(OUTPUTDIR) release
4847

4948
$(OUTPUTDIR)/sdnbridge $(OUTPUTDIR)/sdnoverlay $(OUTPUTDIR)/nat : $(CNIFILES)
5049
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
@@ -56,3 +55,9 @@ test :
5655
.PHONY : format
5756
format :
5857
gofmt -s -l -w ./common/* ./cni/* ./network/* ./plugins/* ./test/*
58+
59+
.PHONY : release
60+
release : all
61+
mkdir -p release; \
62+
zip -jrmv release/windows-container-networking-cni-amd64-$(VERSION).zip out; \
63+
for file in ./release/*.zip ; do shasum -a 512 $$file > $$file.sha512 ; done

0 commit comments

Comments
 (0)