Skip to content

Commit 882982b

Browse files
author
Steve Lovell
committed
commit build script
1 parent c315876 commit 882982b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

create_binaries.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# This script partly automates creation of gopher_check binaries for new releases.
4+
5+
createBinaries() {
6+
  read -p "enter the current semantic version number: " version
7+
  echo "creating binaries for version: ${version}"
8+
  mkdir "./binaries"
9+
  versionPath="./binaries/${version}"
10+
  mkdir "${versionPath}"
11+
12+
  mkdir "${versionPath}/mac"
13+
  env GOARCH=amd64 GOOS=darwin go build -o "${versionPath}/mac/gopher_check"
14+
  zip "${versionPath}/mac/gopher_check-${version}-mac-amd64.zip" "${versionPath}/mac/gopher_check"
15+
16+
  mkdir "${versionPath}/windows"
17+
  env GOARCH=amd64 GOOS=windows go build -o "${versionPath}/windows/gopher_check.exe"
18+
  zip "${versionPath}/windows/gopher_check-${version}-windows-amd64.zip" "${versionPath}/windows/gopher_check.exe"
19+
20+
  mkdir "${versionPath}/linux"
21+
  env GOARCH=amd64 GOOS=linux go build -o "${versionPath}/linux/gopher_check"
22+
  zip "${versionPath}/linux/gopher_check-${version}-linux-amd64.zip" "${versionPath}/linux/gopher_check"
23+
}
24+
25+
createBinaries

0 commit comments

Comments
 (0)