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