Added build script
This commit is contained in:
15
build.sh
Normal file
15
build.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
package="fitra"
|
||||||
|
|
||||||
|
platforms=("linux/amd64" "linux/arm64")
|
||||||
|
|
||||||
|
for platform in "${platforms[@]}"
|
||||||
|
do
|
||||||
|
platform_split=(${platform//\// })
|
||||||
|
GOOS=${platform_split[0]}
|
||||||
|
GOARCH=${platform_split[1]}
|
||||||
|
output_name=$package'-'$GOOS'-'$GOARCH
|
||||||
|
|
||||||
|
env GOOS=$GOOS GOARCH=$GOARCH go build -o $output_name
|
||||||
|
echo "Built $output_name"
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user