Skip to content

Commit

Permalink
fix update-deps CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Sep 12, 2023
1 parent 8113586 commit 6b978eb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Update Dependencies
on:
# Run every day.
schedule:
- cron: '0 3 * * *'
- 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
# branches:
# - main

jobs:
android:
Expand All @@ -23,6 +23,7 @@ jobs:
with:
path: flutter/scripts/update-cocoa.sh
name: Cocoa SDK
runs-on: macos-latest
secrets:
api-token: ${{ secrets.CI_DEPLOY_KEY }}

Expand Down
13 changes: 12 additions & 1 deletion flutter/scripts/generate-cocoa-bindings.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail

if [[ -n ${CI:+x} ]]; then
echo "Running in CI so we need to set up Flutter SDK first"
curl -Lv https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.13.3-stable.zip --output /tmp/flutter.zip
unzip /tmp/flutter.zip -d /tmp
export PATH=":/tmp/flutter/bin:$PATH"
which flutter
flutter --version
fi

cocoa_version="${1:-$(./scripts/update-cocoa.sh get-version)}"

cd "$(dirname "$0")/../"
Expand All @@ -21,9 +30,11 @@ rm -rf $temp
mkdir -p $temp
curl -Lv https://github.com/getsentry/sentry-cocoa/releases/download/$cocoa_version/Sentry.xcframework.zip -o $temp/Sentry.xcframework.zip
subdir="Carthage/Build/Sentry.xcframework/macos-arm64_x86_64/Sentry.framework"
unzip -q $temp/Sentry.xcframework.zip "$subdir/*" -d $temp
unzip $temp/Sentry.xcframework.zip "$subdir/*" -d $temp
mv "$temp/$subdir" $temp/Sentry.framework

dart run ffigen --config ffi-cocoa.yaml
sed -i.bak 's|final class|class|g' lib/src/sentry_cocoa.dart
rm lib/src/sentry_cocoa.dart.bak

exit 1
4 changes: 3 additions & 1 deletion flutter/scripts/update-cocoa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ fi

case $1 in
get-version)
echo ${BASH_REMATCH[2]}
# xxx
echo "8.10.0"
# echo ${BASH_REMATCH[2]}
;;
get-repo)
echo "https://github.com/getsentry/sentry-cocoa.git"
Expand Down

0 comments on commit 6b978eb

Please sign in to comment.