10 Star 79 Fork 0

yoyofx / yoyogo

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
build.sh 577 Bytes
Copy Edit Web IDE Raw Blame History
yoyofx authored 2020-08-14 16:29 . 1.read config with env (prod,test,dev).
#!/usr/bin/Env bash
osArray=("linux" "darwin" "freebsd" "windows")
archs=("amd64" "386")
version=${1-"0.0.1-preview1"}
out_file="yoyocli"
build() {
os=$1
arch=$2
go env -w GOPROXY=https://goproxy.cn,direct
GOOS=$os GOARCH=$arch go build -o "${out_file}" Cli.go
tgzName="${out_file}_${version}_${os}_${arch}.tar.gz"
rm -f "${tgzName}"
tar -czf "${tgzName}" "${out_file}"
rm -f "${out_file}"
echo $(shasum -a 256 "${tgzName}")
}
main() {
for os in "${osArray[@]}"; do
for arch in "${archs[@]}"; do
build "${os}" "${arch}"
done
done
}
main

Comment ( 0 )

Sign in for post a comment

Go
1
https://gitee.com/yoyofx/yoyogo.git
git@gitee.com:yoyofx/yoyogo.git
yoyofx
yoyogo
yoyogo
master

Search