forked from yunify/confd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease
executable file
·35 lines (26 loc) · 1.07 KB
/
release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
source ./env
gen_version
echo "Release confd linux amd64 version ..."
mkdir -p bin/linux
env GOOS=linux GOARCH=amd64 go build -o bin/linux/confd .
tar -C bin/linux/ -czf bin/linux/confd-linux-amd64.tar.gz confd
echo "Release confd linux arm64 version ..."
mkdir -p bin/arm64
env GOOS=linux GOARCH=arm64 go build -o bin/arm64/confd .
tar -C bin/arm64/ -czf bin/arm64/confd-linux-arm64.tar.gz confd
echo "Release confd darwin amd64 version ..."
mkdir -p bin/darwin
env GOOS=darwin GOARCH=amd64 go build -o bin/darwin/confd .
tar -C bin/darwin/ -czf bin/darwin/confd-darwin-amd64.tar.gz confd
echo "Release confd windows version ..."
mkdir -p bin/windows
env GOOS=windows GOARCH=386 go build -o bin/windows/confd.exe .
cd bin/windows && zip confd-windows-386.zip confd.exe && cd ../../
echo "Release confd alpine version ..."
mkdir -p bin/alpine
docker build -t confd_builder -f Dockerfile.build.alpine .
docker run -ti --rm -v $(pwd):/app confd_builder ./build bin/alpine/confd
tar -C bin/alpine/ -czf bin/alpine/confd-alpine-amd64.tar.gz confd
ls -lh bin/*
revert_version