Commit 1a28443 1 parent b8613be commit 1a28443 Copy full SHA for 1a28443
File tree 2 files changed +12
-12
lines changed
2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
BINARY =salt-bootstrap
2
2
3
- VERSION =0.13.6
3
+ VERSION =0.13.7
4
4
BUILD_TIME =$(shell date +% FT% T)
5
5
LDFLAGS =-ldflags "-X github.com/hortonworks/salt-bootstrap/saltboot.Version=${VERSION} -X github.com/hortonworks/salt-bootstrap/saltboot.BuildTime=${BUILD_TIME}"
6
6
GOFILES_NOVENDOR = $(shell find . -type f -name '* .go' -not -path "./vendor/* " -not -path "./.git/* ")
41
41
test :
42
42
go test -timeout 30s -coverprofile coverage -race $$(go list ./... | grep -v /vendor/ )
43
43
44
- _build : build-darwin build-linux build-ppc64le
44
+ _build : build-darwin build-linux build-ppc64le build-linux-arm64
45
45
46
46
build : _check test _build
47
47
@@ -50,16 +50,18 @@ build-docker:
50
50
docker run --rm ${USER_NS} -v " ${PWD} " :/go/src/github.com/hortonworks/salt-bootstrap -w /go/src/github.com/hortonworks/salt-bootstrap -e VERSION=${VERSION} golang:1.14.3 make build
51
51
52
52
build-darwin :
53
- GOOS=darwin go build -a -installsuffix cgo ${LDFLAGS} -o build/Darwin /${BINARY} main.go
53
+ GOOS=darwin go build -a -installsuffix cgo ${LDFLAGS} -o build/Darwin_x86_64 /${BINARY} main.go
54
54
55
55
build-linux :
56
- GOOS=linux go build -a -installsuffix cgo ${LDFLAGS} -o build/Linux/${BINARY} main.go
56
+ GOOS=linux go build -a -installsuffix cgo ${LDFLAGS} -o build/Linux_x86_64/${BINARY} main.go
57
+
58
+ build-linux-arm64 :
59
+ GOOS=linux GOARCH=arm64 go build -a -installsuffix cgo ${LDFLAGS} -o build/Linux_arm64/${BINARY} main.go
57
60
58
61
build-ppc64le :
59
- GOOS=linux GOARCH=ppc64le go build -a -installsuffix cgo ${LDFLAGS} -o build/Linux-ppc64le /${BINARY} main.go
62
+ GOOS=linux GOARCH=ppc64le go build -a -installsuffix cgo ${LDFLAGS} -o build/Linux_ppc64le /${BINARY} main.go
60
63
61
64
release : build-docker
62
- rm -rf release
63
65
VERSION=${VERSION} BINARY=${BINARY} ./release.sh
64
66
65
67
docker_env_up :
Original file line number Diff line number Diff line change 4
4
rm -rf release
5
5
mkdir release
6
6
7
- ARCH=$( uname -m)
8
-
9
- declare -a Platforms=(" Linux" " Darwin" )
10
- for platform in ${Platforms[@]} ; do
7
+ declare -a Platforms=(" Linux_x86_64" " Darwin_x86_64" " Linux_arm64" )
8
+ for platform in " ${Platforms[@]} " ; do
11
9
if [ -d " ./build/$platform " ]; then
12
10
echo " Compressing the ${platform} relevant binary ..."
13
- tar -zcf " release/${BINARY} _${VERSION} _${platform} _ ${ARCH} .tgz" -C build/$platform $BINARY
11
+ tar -zcf " release/${BINARY} _${VERSION} _${platform} .tgz" -C build/$platform $BINARY
14
12
fi
15
13
done
16
14
17
15
echo " Creating release v${VERSION} from branch $BRANCH ..."
18
16
19
17
output=$( gh release list | grep ${VERSION} )
20
18
if [ -z " $output " ]; then
21
- gh release create " v${VERSION} " " ./release/${BINARY} _ ${VERSION} _Linux_ ${ARCH} .tgz" " ./release/ ${BINARY} _ ${VERSION} _Darwin_ ${ARCH} .tgz " -t ${VERSION} -n " "
19
+ gh release create " v${VERSION} " ./release/* .tgz -t ${VERSION} -n " "
22
20
else
23
21
echo " The cli release ${VERSION} already exists on the github."
24
22
fi
You can’t perform that action at this time.
0 commit comments