Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

Commit 5ef83af

Browse files
committed
Solaris build, version in name
1 parent b0437d8 commit 5ef83af

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

build.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,31 @@
33
BIN=ipfixcat
44
VER=$(git describe --always)
55

6+
rm -f *.tar.gz *.zip
67
for GOARCH in amd64 386 ; do
7-
for GOOS in darwin linux freebsd freebsd ; do
8+
for GOOS in darwin linux freebsd solaris ; do
89
export GOOS
910
export GOARCH
1011

11-
NAME="$BIN-$GOOS-$GOARCH"
12+
NAME="$BIN-${VER}_$GOOS-$GOARCH"
1213
rm -rf "$NAME" "$NAME.tar.gz" "$BIN" "$BIN.exe"
1314
go build -ldflags "-X main.ipfixcatVersion ${VER}"
1415

1516
mkdir "$NAME"
16-
cp *.ini ipfixcat "$NAME"
17-
tar zcf "$NAME.tar.gz" "$NAME"
17+
cp *.ini ipfixcat "$NAME" && tar zcf "$NAME.tar.gz" "$NAME"
1818
rm -r "$NAME"
1919
done
2020

2121
for GOOS in windows ; do
2222
export GOOS
2323
export GOARCH
2424

25-
NAME="$BIN-$GOOS-$GOARCH"
25+
NAME="$BIN-${VER}_$GOOS-$GOARCH"
2626
rm -rf "$NAME" "$NAME.tar.gz" "$BIN" "$BIN.exe"
2727
go build -ldflags "-X main.ipfixcatVersion ${VER}"
2828

2929
mkdir "$NAME"
30-
cp *.ini ipfixcat.exe "$NAME"
31-
zip -r "$NAME.zip" "$NAME"
30+
cp *.ini ipfixcat.exe "$NAME" && zip -r "$NAME.zip" "$NAME"
3231
rm -r "$NAME"
3332
done
3433
done

0 commit comments

Comments
 (0)