From 0ae71c62f9f1a6b560c09ee558bbb20cacaf728d Mon Sep 17 00:00:00 2001 From: Admin Date: Sun, 5 Apr 2026 17:52:42 +0500 Subject: [PATCH] fix: switch CI source map upload from glitchtip-cli to sentry-cli MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit glitchtip-cli v0.1.0 uploads chunks but never calls the assemble endpoint, leaving releases with 0 files. sentry-cli correctly calls assemble after chunk upload — confirmed working in manual test (2.5.84-test3 = 211 files). --- .gitea/workflows/release.yaml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index bf0bd36..5a4385d 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -164,14 +164,11 @@ jobs: - name: Build with source maps run: npm run build - - name: Download glitchtip-cli - run: | - curl -L "https://gitlab.com/glitchtip/glitchtip-cli/-/jobs/artifacts/v0.1.0/raw/artifacts/glitchtip-cli-linux-x86_64?job=build-linux-x86_64" \ - -o /usr/local/bin/glitchtip-cli - chmod +x /usr/local/bin/glitchtip-cli + - name: Install sentry-cli + run: npm install -g @sentry/cli - name: Inject debug IDs into build artifacts - run: glitchtip-cli sourcemaps inject ./build + run: sentry-cli sourcemaps inject ./build env: SENTRY_URL: https://errors.libnovel.cc/ SENTRY_AUTH_TOKEN: ${{ secrets.GLITCHTIP_AUTH_TOKEN }} @@ -179,7 +176,7 @@ jobs: SENTRY_PROJECT: ui - name: Create GlitchTip release - run: glitchtip-cli releases new ${{ steps.ver.outputs.version }} + run: sentry-cli releases new ${{ steps.ver.outputs.version }} env: SENTRY_URL: https://errors.libnovel.cc/ SENTRY_AUTH_TOKEN: ${{ secrets.GLITCHTIP_AUTH_TOKEN }} @@ -187,7 +184,7 @@ jobs: SENTRY_PROJECT: ui - name: Upload source maps to GlitchTip - run: glitchtip-cli sourcemaps upload ./build --release ${{ steps.ver.outputs.version }} + run: sentry-cli sourcemaps upload ./build --release ${{ steps.ver.outputs.version }} env: SENTRY_URL: https://errors.libnovel.cc/ SENTRY_AUTH_TOKEN: ${{ secrets.GLITCHTIP_AUTH_TOKEN }} @@ -195,7 +192,7 @@ jobs: SENTRY_PROJECT: ui - name: Finalize GlitchTip release - run: glitchtip-cli releases finalize ${{ steps.ver.outputs.version }} + run: sentry-cli releases finalize ${{ steps.ver.outputs.version }} env: SENTRY_URL: https://errors.libnovel.cc/ SENTRY_AUTH_TOKEN: ${{ secrets.GLITCHTIP_AUTH_TOKEN }} @@ -206,20 +203,18 @@ jobs: run: | set -euo pipefail KEEP=10 - # Fetch releases sorted newest-first, extract versions after the first $KEEP OLD=$(curl -sf \ -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \ "$SENTRY_URL/api/0/organizations/$SENTRY_ORG/releases/?project=$SENTRY_PROJECT&per_page=100" \ | python3 -c " import sys, json releases = json.load(sys.stdin) - # Skip beyond the first KEEP entries for r in releases[$KEEP:]: print(r['version']) " KEEP=$KEEP) for ver in $OLD; do echo "Deleting old release: $ver" - glitchtip-cli releases delete "$ver" || true + sentry-cli releases delete "$ver" || true done env: SENTRY_URL: https://errors.libnovel.cc