Create build-binaries.sh
This commit is contained in:
parent
69db192f6c
commit
5d39ed139c
2 changed files with 34 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@ linsk
|
|||
linsk.exe
|
||||
*.qcow2
|
||||
bin/
|
||||
build/
|
||||
32
build-binaries.sh
Normal file
32
build-binaries.sh
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
rm -rf build
|
||||
mkdir build
|
||||
|
||||
trimpath=$PWD
|
||||
echo "Trimming path $trimpath"
|
||||
|
||||
version=$1
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
echo "Version is not specified (first positional argument)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function build() {
|
||||
file_name="linsk_${1}_${2}_${version}"
|
||||
CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -trimpath -o build/$file_name
|
||||
cd build
|
||||
zip $file_name.zip $file_name
|
||||
rm $file_name
|
||||
cd ..
|
||||
}
|
||||
|
||||
build windows amd64
|
||||
build darwin amd64
|
||||
build darwin arm64
|
||||
|
||||
cd build
|
||||
|
||||
hashes_file="linsk_sha256_$version.txt"
|
||||
|
||||
sha256sum * > $hashes_file
|
||||
gpg --output ${hashes_file}.sig --detach-sign --armor $hashes_file
|
||||
Loading…
Add table
Add a link
Reference in a new issue