File tree 2 files changed +30
-2
lines changed
2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ NAME := netplugin
15
15
VERSION_FILE := $(NAME ) -version
16
16
VERSION := ` cat $( VERSION_FILE) `
17
17
TAR_EXT := tar.bz2
18
+ TAR_FILENAME := $(NAME ) -$(VERSION ) .$(TAR_EXT )
19
+ TAR_LOC := .
20
+ TAR_FILE := $(TAR_LOC ) /$(TAR_FILENAME )
18
21
GO_MIN_VERSION := 1.7
19
22
GO_MAX_VERSION := 1.8
20
23
GO_VERSION := $(shell go version | cut -d' ' -f3 | sed 's/go//')
@@ -318,7 +321,19 @@ host-plugin-release:
318
321
@echo dev: need docker login with user in contiv org
319
322
docker plugin push ${CONTIV_V2PLUGIN_NAME}
320
323
324
+ only-tar :
325
+
326
+ tar : clean-tar
327
+ CONTIV_NODES=1 ${MAKE} build
328
+ @tar -jcf $(TAR_FILE ) -C $(GOPATH ) /src/github.com/contiv/netplugin/bin netplugin netmaster netctl contivk8s netcontiv -C $(GOPATH ) /src/github.com/contiv/netplugin/scripts contrib/completion/bash/netctl -C $(GOPATH ) /src/github.com/contiv/netplugin/scripts get-contiv-diags
329
+
330
+ clean-tar :
331
+ @rm -f $(TAR_LOC ) /* .$(TAR_EXT )
332
+ @rm -f ${VERSION_FILE}
333
+
321
334
# GITHUB_USER and GITHUB_TOKEN are needed be set to run github-release
322
- release :
335
+ release : tar
336
+ TAR_FILENAME=$(TAR_FILENAME ) TAR_FILE=$(TAR_FILE ) \
323
337
OLD_VERSION=${OLD_VERSION} BUILD_VERSION=${BUILD_VERSION} \
324
338
USE_RELEASE=${USE_RELEASE} scripts/release.sh
339
+ @make clean-tar
Original file line number Diff line number Diff line change @@ -12,6 +12,17 @@ if [ -z "$(which github-release)" ]; then
12
12
exit 1
13
13
fi
14
14
15
+
16
+ if [ -z " ${TAR_FILENAME-} " ]; then
17
+ echo " TAR_FILENAME needs to be defined to make a release"
18
+ exit 1
19
+ fi
20
+
21
+ if [ ! -f " $TAR_FILE " ]; then
22
+ echo " TAR_FILE ($TAR_FILE ) doesn't exist"
23
+ exit 1
24
+ fi
25
+
15
26
if [ -z " $BUILD_VERSION " ]; then
16
27
echo " A release requires BUILD_VERSION to be defined"
17
28
exit 1
43
54
fi
44
55
45
56
set -x
46
- ( (github-release -v release $pre_release -r netplugin -t $BUILD_VERSION -d " **Changelog**<br/>$changelog " )) || exit 1
57
+ ( (github-release -v release $pre_release -r netplugin -t $BUILD_VERSION -d " **Changelog**<br/>$changelog " ) \
58
+ && (github-release -v upload -r netplugin -t $BUILD_VERSION -n $TAR_FILENAME -f $TAR_FILE \
59
+ || github-release -v delete -r netplugin -t $BUILD_VERSION )) || exit 1
You can’t perform that action at this time.
0 commit comments