We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ed20de commit 614fd2aCopy full SHA for 614fd2a
make_release.sh
@@ -0,0 +1,25 @@
1
+#!/bin/bash
2
+VERSION=$(grep app.Version main.go | cut -d= -f 2 | tr -d '[:space:]"')
3
+GO_OSARCH="darwin/amd64 linux/386 linux/amd64 linux/arm windows/386 windows/amd64"
4
+
5
+mkdir -p dist
6
7
+for v in ${GO_OSARCH}; do
8
+ GOOS=$(echo ${v} | cut -d/ -f 1)
9
+ GOARCH=$(echo ${v} | cut -d/ -f 2)
10
+ GOOS=${GOOS} GOARCH=${GOARCH} go build
11
+ exe=max7456tool
12
+ rel=max7456tool_${VERSION}_${GOOS}_${GOARCH}
13
+ if [ ${GOOS} = "windows" ]; then
14
+ exe=${exe}.exe
15
+ zip=${rel}.zip
16
+ zip ${zip} ${exe}
17
+ mv ${zip} dist
18
+ else
19
+ tgz=${rel}.tar.gz
20
+ tar czf ${tgz} ${exe}
21
+ mv ${tgz} dist
22
+ fi
23
+done
24
25
+go clean
0 commit comments