File tree Expand file tree Collapse file tree 6 files changed +55
-55
lines changed Expand file tree Collapse file tree 6 files changed +55
-55
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ cd $( dirname " $0 " )
4+
5+ # init variable `builds`
6+ source ./build-all.inc.sh
7+
8+ prefix=$( realpath ../)
9+ rm -rf " $prefix /output/"
10+
11+ buildByDocker () {
12+ gover=" $1 "
13+ shift
14+ docker pull golang:" $gover "
15+
16+ docker run \
17+ --rm \
18+ -v " $prefix " :/mnt \
19+ -e EX_UID=" $( id -u) " \
20+ -e EX_GID=" $( id -g) " \
21+ golang:" $gover " \
22+ /bin/bash -c '
23+ sed -i -e "s;://[^/ ]*;://mirrors.aliyun.com;" /etc/apt/sources.list;
24+ apt-get update;
25+ apt-get install -yq git zip;
26+ /bin/bash /mnt/build/build.sh "$@";
27+ chown -R $EX_UID:$EX_GID /mnt/output;
28+ ' \
29+ ' argv_0_placeholder' \
30+ " $@ "
31+ }
32+
33+ gover=latest
34+ buildByDocker " $gover " " ${builds[@]} "
35+
36+ # gover=1.16
37+ # builds=('darwin amd64 -10.12-sierra')
38+ # buildByDocker "$gover" "${builds[@]}"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ builds=(' linux 386' ' linux amd64' ' linux arm' ' linux arm64' ' linux riscv64' ' windows 386' ' windows amd64' ' windows arm' ' windows arm64' ' darwin amd64' ' darwin arm64' )
2+ builds=(" ${builds[@]} " ' freebsd 386' ' freebsd amd64' ' freebsd arm' ' freebsd arm64' )
3+ builds=(" ${builds[@]} " ' openbsd 386' ' openbsd amd64' ' openbsd arm' ' openbsd arm64' )
4+ builds=(" ${builds[@]} " ' netbsd 386' ' netbsd amd64' ' netbsd arm' ' netbsd arm64' )
5+ builds=(" ${builds[@]} " ' dragonfly amd64' )
6+ builds=(" ${builds[@]} " ' plan9 386' ' plan9 amd64' ' plan9 arm' )
Original file line number Diff line number Diff line change 33cd $( dirname " $0 " )
44rm -rf ../output/
55
6- builds=(' linux 386' ' linux amd64' ' linux arm' ' linux arm64' ' linux riscv64' ' windows 386' ' windows amd64' ' windows arm' ' windows arm64' ' darwin amd64' ' darwin arm64' )
7- builds=(" ${builds[@]} " ' freebsd 386' ' freebsd amd64' ' freebsd arm' ' freebsd arm64' )
8- builds=(" ${builds[@]} " ' openbsd 386' ' openbsd amd64' ' openbsd arm' ' openbsd arm64' )
9- builds=(" ${builds[@]} " ' netbsd 386' ' netbsd amd64' ' netbsd arm' ' netbsd arm64' )
10- builds=(" ${builds[@]} " ' dragonfly amd64' )
11- builds=(" ${builds[@]} " ' plan9 386' ' plan9 amd64' ' plan9 arm' )
6+ # init variable `builds`
7+ source ./build-all.inc.sh
8+
129bash ./build.sh " ${builds[@]} "
Original file line number Diff line number Diff line change 1+ TMP=' /tmp'
2+ OUTDIR=' ../output'
3+ MAINNAME=' ghfs'
4+ MOD=$( go list ../src/)
5+ VERSION=$( git describe --abbrev=0 --tags 2> /dev/null || git rev-parse --abbrev-ref HEAD 2> /dev/null)
6+ LDFLAGS=" -s -w -X $MOD /version.appVer=$VERSION "
7+ LICENSE=' ../LICENSE'
Original file line number Diff line number Diff line change 33cd $( dirname " $0 " )
44
55export GO111MODULE=auto
6-
7- TMP=' /tmp'
8- OUTDIR=' ../output'
9- MAINNAME=' ghfs'
10- MOD=$( go list ../src/)
11- VERSION=$( git describe --abbrev=0 --tags 2> /dev/null || git rev-parse --abbrev-ref HEAD 2> /dev/null)
12- LDFLAGS=" -s -w -X $MOD /version.appVer=$VERSION "
13- LICENSE=' ../LICENSE'
6+ source ./build.inc.sh
147
158mkdir -p " $OUTDIR "
169
You can’t perform that action at this time.
0 commit comments