mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-24 01:07:41 +00:00
Previously the builder scripts defined a readonly `VERSION` environment variable for the Keyman version. That caused problems when another (external) script tried to define a `VERSION` variable. We encountered this problem when trying to move the TC build steps of a configuration into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`. This change uses a Keyman specific prefix for the version variables and renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables are used in a lot of places, so this turned out to be a bit of a yak shave. Test-bot: skip
41 lines
1.3 KiB
Bash
41 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
#
|
|
# This script centralises sentry symbol uploads and releases
|
|
# Note: We must install sentry-cli on the build agents
|
|
#
|
|
|
|
|
|
## TODO: centralise debug information file (dif) uploads
|
|
|
|
|
|
function isSentryConfigured() {
|
|
if [ -z "${SENTRY_AUTH_TOKEN-}" ] || [ -z "${SENTRY_ORG-}" ] || [ -z "${SENTRY_URL-}" ]; then
|
|
echo "WARNING: Sentry environment variables SENTRY_AUTH_TOKEN, SENTRY_ORG and SENTRY_URL must be configured."
|
|
return 1
|
|
fi
|
|
return 0
|
|
}
|
|
|
|
function isSentryCliAvailable() {
|
|
which sentry-cli > /dev/null && return 0
|
|
echo "WARNING: sentry-cli could not be found. Skipping all sentry integration."
|
|
return 1
|
|
}
|
|
|
|
function makeSentryRelease() {
|
|
if isSentryConfigured; then
|
|
if isSentryCliAvailable; then
|
|
# This version tag matches the repository version tag release@x.y.z
|
|
echo "Making a Sentry release for tag $KEYMAN_VERSION_GIT_TAG"
|
|
sentry-cli releases new -p keyman-android -p keyman-developer -p keyman-ios -p keyman-linux -p keyman-mac -p keyman-web -p keyman-windows $KEYMAN_VERSION_GIT_TAG
|
|
|
|
echo "Setting commits for release tag $KEYMAN_VERSION_GIT_TAG"
|
|
sentry-cli releases set-commits --auto $KEYMAN_VERSION_GIT_TAG
|
|
|
|
echo "Finalizing release tag $KEYMAN_VERSION_GIT_TAG"
|
|
sentry-cli releases finalize "$KEYMAN_VERSION_GIT_TAG"
|
|
fi
|
|
fi
|
|
}
|
|
|