This commit is contained in:
Your Name 2025-05-12 18:54:44 +12:00
parent d716b0f9e9
commit b72e93af2c
5 changed files with 12 additions and 13 deletions

View File

@ -1 +0,0 @@
4

Binary file not shown.

Binary file not shown.

View File

@ -12,15 +12,16 @@ set -e
# Prints a message to the user. # Prints a message to the user.
# Increment version # Increment version
if [ ! -f VERSION ]; then if [ ! -f version.h ]; then
echo 1 > VERSION echo "version.h not found!" >&2
exit 1
else else
v=$(cat VERSION) v=$(cat version.h | grep -o 'static const char \*VERSION = "[0-9.]*";' | cut -d'"' -f2)
v=$((v+1)) v=$((v+1))
echo $v > VERSION echo "Incrementing version from $v to $v" >&2
echo "static const char *VERSION = \"$v\";" > version.h
fi fi
VERSION=$(cat VERSION) TAG="v$v"
TAG="v$VERSION"
# Build binaries # Build binaries
./build.sh ./build.sh
@ -68,16 +69,16 @@ if [ -z "$RELEASE_ID" ]; then
fi fi
# Upload binaries # Upload binaries
for BIN in bb64 bb64.arm64; do for BIN in bb64.amd64 bb64.arm64; do
if [ -f "$BIN" ]; then if [ -f "output/$BIN" ]; then
curl -s -X POST "$API_URL/releases/$RELEASE_ID/assets?name=$BIN" \ curl -s -X POST "$API_URL/releases/$RELEASE_ID/assets?name=$BIN" \
-H "Content-Type: application/octet-stream" \ -H "Content-Type: application/octet-stream" \
-H "Authorization: token $GITEA_TOKEN_DEPLOY" \ -H "Authorization: token $GITEA_TOKEN_DEPLOY" \
--data-binary @"$BIN" --data-binary @"output/$BIN"
echo "Uploaded $BIN to release $TAG." echo "Uploaded $BIN to release $TAG."
fi fi
done done
echo "Published bb64 version $VERSION to $REPO_URL (tag $TAG) with binaries." echo "Published bb64 version $v to $REPO_URL (tag $TAG) with binaries."

View File

@ -1,2 +1 @@
static const char *VERSION = "1"; static const char *VERSION = "2";