File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -5,23 +5,28 @@ if len($ARGS) != "2" {
5
5
exit(" 1" )
6
6
}
7
7
8
- version = $ARGS [1]
8
+ version = $ARGS [1]
9
9
supported_os = (" linux" " darwin" " windows" )
10
10
11
11
# Guarantee passing tests at least on the host arch/os
12
12
make test
13
13
14
- setenv CGO_ENABLED=" 0"
14
+ setenv CGO_ENABLED = " 0"
15
+
15
16
mkdir -p dist
16
17
17
18
for os in $supported_os {
18
- setenv GOOS = $os
19
- setenv GOARCH = " amd64"
20
- echo " building OS: " + $GOOS + " ARCH : " + $GOARCH
21
- make build " version=" + $version
22
- if $os ! = " windows" {
23
- cp " cmd/nash/nash" " dist/nash-" +$os +" -amd64"
24
- } else {
25
- cp cmd/nash/nash.exe " dist/nash-" +$os +" -amd64.exe"
26
- }
19
+ setenv GOOS = $os
20
+ setenv GOARCH = " amd64"
21
+
22
+ echo " building OS: " +$GOOS +" ARCH : " +$GOARCH
23
+ make build " version=" +$version
24
+
25
+ binpath < = format(" dist/nash-%s-%s-amd64" , $version , $os )
26
+
27
+ if $os ! = " windows" {
28
+ binpath = $binpath +" .exe"
29
+ }
30
+
31
+ cp " cmd/nash/nash" $binpath
27
32
}
You can’t perform that action at this time.
0 commit comments