Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
32 lines (28 loc) · 908 Bytes

File metadata and controls

executable file
·
32 lines (28 loc) · 908 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
rm -rf bin
package_path=$1
package_name=$2
version_inject=$3
if [[ -z "$package_path" ]]; then
echo "usage: $0 <package-name>"
exit 1
fi
platforms=("windows/amd64" "windows/386" "darwin/amd64" "linux/arm64" "linux/amd64")
for platform in "${platforms[@]}"
do
platform_split=(${platform//\// })
GOOS=${platform_split[0]}
GOARCH=${platform_split[1]}
output_name=bin/$package_name'-'$GOOS'-'$GOARCH
if [ $GOOS = "windows" ]; then
output_name+='.exe'
fi
if [ $GOOS = "darwin" ] && [ $package_path = "agent_client" ]; then
continue
fi
env GOOS=$GOOS GOARCH=$GOARCH go build -o $output_name -ldflags "-s -w -X github.com/squzy/squzy/apps/$package_path/version.Version=$version_inject" apps/$package_path/main.go
if [ $? -ne 0 ]; then
echo 'An error has occurred! Aborting the script execution...'
exit 1
fi
done
Morty Proxy This is a proxified and sanitized view of the page, visit original site.