diff --git a/package.json b/package.json index d2525b6..7ca1fd8 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "vite dev", "build": "./build.sh", - "sourcemaps": "sentry-cli --url https://glitchtip.coracle.social --auth-token $GLITCHTIP_AUTH_TOKEN --api-key $VITE_GLITCHTIP_API_KEY sourcemaps --org coracle --project flotilla --release $(cat package.json|jq -r '.version') upload --url-prefix /_app/immutable/ build/_app/immutable", + "sourcemaps": "./sourcemaps.sh", "release:android": "cap build android --androidreleasetype APK --signing-type apksigner", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", diff --git a/sourcemaps.sh b/sourcemaps.sh new file mode 100755 index 0000000..dcd258a --- /dev/null +++ b/sourcemaps.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +hash=$(find build -type f -print0 | sort -z | xargs -0 sha1sum | sha1sum | awk '{print $1}') + +sentry-cli \ + --url https://glitchtip.coracle.social \ + --auth-token $GLITCHTIP_AUTH_TOKEN \ + --api-key $VITE_GLITCHTIP_API_KEY \ + sourcemaps \ + --org coracle \ + --project flotilla \ + --release $hash \ + upload \ + --url-prefix /_app/immutable/ \ + build/_app/immutable