File tree 2 files changed +33
-1
lines changed
2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 4
4
* .dll
5
5
* .so
6
6
* .dylib
7
- certmin
7
+ certmin *
8
+ binaries /
8
9
9
10
# Test binary, built with `go test -c`
10
11
* .test
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+ set -xv
3
+ APP=certmin
4
+ BIN_DIR=binaries
5
+ PLATFORMS=(" windows/amd64" " darwin/amd64" " linux/amd64" )
6
+ SRC_DIR=$( pwd)
7
+ # BUILD_CMD="go build -a -installsuffix cgo -ldflags -s"
8
+ BUILD_CMD=" go build"
9
+ VERSION=$( git describe --tags)
10
+
11
+ function build {
12
+ GOOS=$1
13
+ GOARCH=$2
14
+ OUTPUT=" ${APP} -${VERSION} -${GOOS} -${GOARCH} "
15
+ if [ $GOOS = " windows" ]; then
16
+ OUTPUT+=' .exe'
17
+ fi
18
+ GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=0 $BUILD_CMD -o $BIN_DIR /$OUTPUT
19
+ cd $BIN_DIR
20
+ sha512sum $OUTPUT > $OUTPUT .sha512
21
+ cat $OUTPUT .sha512
22
+ cd $SRC_DIR
23
+ }
24
+
25
+ mkdir -p $BIN_DIR
26
+ for i in ${PLATFORMS[@]} ; do
27
+ PLATFORMS_SPLIT=(${i// \/ / } )
28
+ GOOS=${PLATFORMS_SPLIT[0]}
29
+ GOARCH=${PLATFORMS_SPLIT[1]}
30
+ build $GOOS $GOARCH
31
+ done
You can’t perform that action at this time.
0 commit comments