Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Update Dependencies

on:
# Run every day.
schedule:
- cron: '0 3 * * *'
# And on on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict.
push:
branches:
- main

jobs:
android:
uses: getsentry/github-workflows/.github/workflows/updater.yml@v1
with:
path: scripts/update-android.sh
name: Android SDK
secrets:
# If a custom token is used instead, a CI would be triggered on a created PR.
# api_token: ${{ secrets.CI_DEPLOY_KEY }}
api_token: ${{ github.token }}

cocoa:
uses: getsentry/github-workflows/.github/workflows/updater.yml@v1
with:
path: scripts/update-cocoa.sh
name: Cocoa SDK
secrets:
# If a custom token is used instead, a CI would be triggered on a created PR.
# api_token: ${{ secrets.CI_DEPLOY_KEY }}
api_token: ${{ github.token }}

javascript:
uses: getsentry/github-workflows/.github/workflows/updater.yml@v1
with:
path: scripts/update-javascript.sh
name: JavaScript SDK
secrets:
# If a custom token is used instead, a CI would be triggered on a created PR.
# api_token: ${{ secrets.CI_DEPLOY_KEY }}
api_token: ${{ github.token }}

wizard:
uses: getsentry/github-workflows/.github/workflows/updater.yml@v1
with:
path: scripts/update-wizard.sh
name: Wizard
secrets:
# If a custom token is used instead, a CI would be triggered on a created PR.
# api_token: ${{ secrets.CI_DEPLOY_KEY }}
api_token: ${{ github.token }}
28 changes: 28 additions & 0 deletions scripts/update-android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail

cd $(dirname "$0")/../android
file='build.gradle'
content=$(cat $file)
regex='(io\.sentry:sentry-android:)([0-9\.]+)'
if ! [[ $content =~ $regex ]]; then
echo "Failed to find the android plugin version in $file"
exit 1
fi

case $1 in
get-version)
echo ${BASH_REMATCH[2]}
;;
get-repo)
echo "https://github.com/getsentry/sentry-java.git"
;;
set-version)
newValue="${BASH_REMATCH[1]}$2"
echo "${content/${BASH_REMATCH[0]}/$newValue}" >$file
;;
*)
echo "Unknown argument $1"
exit 1
;;
esac
27 changes: 27 additions & 0 deletions scripts/update-cocoa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail

file="$(dirname "$0")/../RNSentry.podspec"
content=$(cat $file)
regex="('Sentry', *)'([0-9\.]+)'"
if ! [[ $content =~ $regex ]]; then
echo "Failed to find the plugin version in $file"
exit 1
fi

case $1 in
get-version)
echo ${BASH_REMATCH[2]}
;;
get-repo)
echo "https://github.com/getsentry/sentry-cocoa.git"
;;
set-version)
newValue="${BASH_REMATCH[1]}'$2'"
echo "${content/${BASH_REMATCH[0]}/$newValue}" >$file
;;
*)
echo "Unknown argument $1"
exit 1
;;
esac
8 changes: 8 additions & 0 deletions scripts/update-javascript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail

repo="https://github.com/getsentry/sentry-javascript.git"
packages=('@sentry/browser' '@sentry/core' '@sentry/hub' '@sentry/integrations' '@sentry/react' '@sentry/tracing' '@sentry/types' '@sentry/utils')
packages+=('@sentry-internal/eslint-config-sdk' '@sentry-internal/eslint-plugin-sdk')

. $(dirname "$0")/update-package-json.sh
30 changes: 30 additions & 0 deletions scripts/update-package-json.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# expects $repo & $packages (array) variables to be defined

file="$(dirname "$0")/../package.json"
content=$(cat $file)

case $1 in
get-version)
regex='"'${packages[0]}'": *"([0-9.]+)"'
if ! [[ $content =~ $regex ]]; then
echo "Failed to find the plugin version in $file"
exit 1
fi
echo ${BASH_REMATCH[1]}
;;
get-repo)
echo $repo
;;
set-version)
list=""
for i in ${!packages[@]}; do
list+="${packages[$i]}@$2 "
# yarn upgrade --non-interactive "@sentry/${packages[$i]}@$2"
done
yarn upgrade --non-interactive $list
;;
*)
echo "Unknown argument $1"
exit 1
;;
esac
7 changes: 7 additions & 0 deletions scripts/update-wizard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

repo="https://github.com/getsentry/sentry-wizard.git"
packages=('@sentry/wizard')

. $(dirname "$0")/update-package-json.sh