bb64 release v22

This commit is contained in:
Your Name 2025-05-12 21:11:33 +12:00
parent c67fb1447b
commit 1339150167
2 changed files with 5 additions and 13 deletions

View File

@ -22,22 +22,11 @@ else
exit 1 exit 1
fi fi
# 2. Get latest release tag from Gitea API
# -----------------------------------------------------------------------------
REPO_API="https://gitea.jde.nz/api/v1/repos/j/bb64/releases/latest"
if command -v jq >/dev/null 2>&1; then
TAG=$(curl -s "$REPO_API" | jq -r '.tag_name')
else
TAG=$(curl -s "$REPO_API" | grep -o '"tag_name"[ ]*:[ ]*\"[^\"]*\"' | head -1 | sed 's/.*: *\"\\([^\"]*\\)\"/\\1/')
fi
echo "Latest version of bb64 is: $TAG"
# 3. Download the appropriate binary to a temp directory # 3. Download the appropriate binary to a temp directory
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
TMPDIR=$(mktemp -d) TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT trap 'rm -rf "$TMPDIR"' EXIT
URL="https://gitea.jde.nz/j/bb64/releases/download/$TAG/$BIN" URL="https://gitea.jde.nz/j/bb64/releases/download/latest/$BIN"
echo "Downloading $BIN from $URL..." echo "Downloading $BIN from $URL..."
curl -fsSL -o "$TMPDIR/bb64" "$URL" curl -fsSL -o "$TMPDIR/bb64" "$URL"
@ -55,5 +44,8 @@ rm "$TMPDIR/bb64"
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
echo "bb64 installed successfully to /usr/local/bin/bb64 (version $TAG, arch $ARCH)" echo "bb64 installed successfully to /usr/local/bin/bb64 (version $TAG, arch $ARCH)"
echo " " echo " "
echo "Update bb64 with:"
echo " bb64 -u"
echo " "
echo "try it out with:" echo "try it out with:"
echo " bb64 ZWNobyAiSGVsbG8td29ybGQhIGJiNjQgaXMgd29ya2luZy4i" echo " bb64 ZWNobyAiSGVsbG8td29ybGQhIGJiNjQgaXMgd29ya2luZy4i"

View File

@ -1 +1 @@
static const char *VERSION = "21"; static const char *VERSION = "22";