Commit 5d9af13 1 parent f32450f commit 5d9af13 Copy full SHA for 5d9af13
File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,13 @@ function build() {
7
7
GOARCH=" $2 "
8
8
COMMAND=" $3 "
9
9
10
- go build -o " $OUTDIR /$GOOS -$GOARCH /$COMMAND " " ./cmd/$COMMAND "
10
+ (
11
+ export CGO_ENABLED=0
12
+ export GOARCH=" $GOARCH "
13
+ export GOOS=" $GOOS "
14
+
15
+ go build -o " $OUTDIR /$GOOS -$GOARCH /$COMMAND " " ./cmd/$COMMAND "
16
+ )
11
17
}
12
18
13
19
function package() {
@@ -18,11 +24,10 @@ function package() {
18
24
zip --recurse-paths " ./$GOOS -$GOARCH .zip" " ./$GOOS -$GOARCH /"
19
25
popd
20
26
21
- rm --recursive " $OUTDIR /$GOOS -$GOARCH /"
27
+ rm -r " $OUTDIR /$GOOS -$GOARCH /"
22
28
}
23
29
24
- CGO_ENABLED=0
25
- DEFAULT_OUTDIR=" $( dirname ${BASH_SOURCE[0]} ) /../dist"
30
+ DEFAULT_OUTDIR=" $( dirname " ${BASH_SOURCE[0]} " ) /../dist"
26
31
OUTDIR=" ${OUTDIR:- $DEFAULT_OUTDIR } "
27
32
28
33
build darwin amd64 spaced
You can’t perform that action at this time.
0 commit comments