Compare commits

...

5 Commits

Author SHA1 Message Date
6b87c9e688 hopefully fix mess from llm assisted api calls 2025-08-02 17:35:52 -04:00
f45342e379 tabbing of block text 2025-08-02 17:25:57 -04:00
929800bf68 fix api calls 2025-08-02 17:24:10 -04:00
5e8e7e4884 typo 2025-08-02 17:16:23 -04:00
bd4f230310 push tag 2025-08-02 17:13:55 -04:00

View File

@@ -16,6 +16,12 @@ ARCHIVE_NAME="X11Proxy-${VERSION}-linux-x86_64.tar.gz"
REPO="ezterry/X11Proxy"
GITEA_URL="https://git-hojo.devnull.name"
if [[ -z "$VERSION" ]]; then
echo "❌ Failed to extract version from main.go"
echo "please fix the version constant in main.go"
exit 1
fi
echo "$BIN_NAME build script (version: $VERSION)"
# 🧹 Clean build artifacts
@@ -44,6 +50,12 @@ build_dist() {
# 🚀 Publish release to Gitea
publish_release() {
#verify we will not run into an issue from a missing jq command
command -v jq >/dev/null || {
echo "❌ 'jq' is required but not installed. Please install it to continue."
exit 1
}
build_dist
echo "🔐 Enter Gitea token (will not be saved):"
@@ -56,9 +68,10 @@ publish_release() {
exit 1
fi
git tag -a "$TAG" -m "Release $TAG"
git push origin $TAG
echo "📤 Creating release on Gitea..."
curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/releases" \
RELEASE_JSON=$(curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/releases" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d @- <<EOF
@@ -70,15 +83,17 @@ publish_release() {
"prerelease": false
}
EOF
)
echo "📎 Uploading asset..."
curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/releases/${TAG}/assets" \
RELEASE_ID=$(echo "$RELEASE_JSON" | jq -r '.id')
echo "📎 Uploading asset to release ID ${RELEASE_ID}..."
curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/releases/${RELEASE_ID}/assets" \
-H "Authorization: token ${GITEA_TOKEN}" \
-F name="${ARCHIVE_NAME}" \
-F attachment=@"${ARCHIVE_NAME}"
echo "✅ Published release ${TAG} with asset ${ARCHIVE_NAME}"
echo "📌 Remember to push the tag: git push origin ${TAG}"
}
# 📖 Help message