Skip to content

Commit

Permalink
build: add release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
andydunstall committed May 16, 2024
1 parent 5e51601 commit b147bc0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build/artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

declare -a arr=(
"linux/amd64"
"linux/arm64"
"darwin/amd64"
"darwin/arm64"
)

mkdir -p bin/artifacts

for i in "${arr[@]}"
do
GOOSARCH=$i
GOOS=${GOOSARCH%/*}
GOARCH=${GOOSARCH#*/}
BINARY_NAME=piko-$GOOS-$GOARCH

echo "Building $BINARY_NAME..."
GOOS=$GOOS GOARCH=$GOARCH go build -o bin/artifacts/$BINARY_NAME main.go
done
14 changes: 14 additions & 0 deletions build/tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -e

# The version must be supplied from the environment. Do not include the
# leading "v".
if [ -z $VERSION ]; then
echo "Please specify a version."
exit 1
fi

git tag -a -m "Version $VERSION" "v${VERSION}" main

exit 0

0 comments on commit b147bc0

Please sign in to comment.