Skip to content

Commit 4846ab7

Browse files
committed
Add version to binary
1 parent 8b53d6e commit 4846ab7

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

hack/releaser.sh

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,28 @@ if len($ARGS) != "2" {
55
exit("1")
66
}
77

8-
version = $ARGS[1]
8+
version = $ARGS[1]
99
supported_os = ("linux" "darwin" "windows")
1010

1111
# Guarantee passing tests at least on the host arch/os
1212
make test
1313

14-
setenv CGO_ENABLED="0"
14+
setenv CGO_ENABLED = "0"
15+
1516
mkdir -p dist
1617

1718
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
2732
}

0 commit comments

Comments
 (0)