Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

prevent deployment race conditions (#3416)

authored by

Hailey and committed by
GitHub
443dfb5c 46c112ed

+23 -6
+22 -5
.github/workflows/bundle-deploy-eas-update.yml
··· 18 18 description: Runtime version (in x.x.x format) that this update is for 19 19 required: true 20 20 21 + concurrency: 22 + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} 23 + cancel-in-progress: true 24 + 21 25 jobs: 22 26 bundleDeploy: 23 27 name: Bundle and Deploy EAS Update ··· 44 48 - name: ⬇️ Checkout 45 49 uses: actions/checkout@v4 46 50 with: 47 - fetch-depth: 100 51 + fetch-depth: 0 52 + 53 + - name: ⬇️ Get last successful deployment commit from the cache 54 + id: get-base-commit 55 + uses: actions/cache@v4 56 + with: 57 + path: last-successful-commit-hash.txt 58 + key: last-successful-deployment-commit-${{ github.ref_name }} 59 + 60 + - name: Add the last successful deployment commit to the output 61 + id: last-successful-commit 62 + run: echo base-commit=$(cat last-successful-commit-hash.txt) >> "$GITHUB_OUTPUT" 48 63 49 64 - name: ⬇️ Fetch commits from base branch 50 65 if: ${{ github.ref != 'refs/heads/main' }} ··· 57 72 if [ -z "${{ inputs.channel == 'production' }}" ]; then 58 73 echo base-commit=$(git show-ref -s ${{ inputs.runtimeVersion }}) >> "$GITHUB_OUTPUT" 59 74 else 60 - echo base-commit=$(git log -n 1 --skip 1 main --pretty=format:'%H') >> "$GITHUB_OUTPUT" 75 + echo base-commit=${{ steps.last-successful-commit.base-commit }} >> "$GITHUB_OUTPUT" 61 76 fi 62 77 63 78 - name: ✓ Make sure we found a base commit 64 79 run: | 65 - if [ -z "${{ steps.base-commit.outputs.base-commit }}" ]; then 80 + if [ -z "${{ steps.base-commit.outputs.base-commit }}" && ${{ inputs.channel == 'production' }} ]; then 66 81 echo "Could not find a base commit for this release. Exiting." 67 82 exit 1 68 83 fi ··· 82 97 uses: expo/expo-github-action/fingerprint@main 83 98 with: 84 99 previous-git-commit: ${{ steps.base-commit.outputs.base-commit }} 85 - args: 86 100 87 101 - name: 👀 Debug fingerprint 88 102 id: fingerprint-debug ··· 90 104 echo "previousGitCommit=${{ steps.fingerprint.outputs.previous-git-commit }} currentGitCommit=${{ steps.fingerprint.outputs.current-git-commit }}" 91 105 echo "isPreviousFingerprintEmpty=${{ steps.fingerprint.outputs.previous-fingerprint == '' }}" 92 106 93 - fingerprintDiff="${{ steps.fingerprint.outputs.fingerprint-diff }}" 107 + fingerprintDiff='$(echo "${{ steps.fingerprint.outputs.fingerprint-diff }}")' 108 + 94 109 if [[ $fingerprintDiff =~ "bareRncliAutolinking" || $fingerprintDiff =~ "expoAutolinkingAndroid" || $fingerprintDiff =~ "expoAutolinkingIos" ]]; then 95 110 echo fingerprint-is-different="true" >> "$GITHUB_OUTPUT" 96 111 else ··· 144 159 RUNTIME_VERSION: ${{ inputs.runtimeVersion }} 145 160 CHANNEL_NAME: ${{ inputs.channel || 'testflight' }} 146 161 162 + - name: Save successful deployment commit hash 163 + run: echo ${{ steps.fingerprint.outputs.current-git-commit }} > last-successful-commit-hash.txt 147 164 148 165 # GitHub actions are horrible so let's just copy paste this in 149 166 buildIfNecessaryIOS:
+1 -1
package.json
··· 35 35 "e2e:run": "NODE_ENV=test detox test --configuration ios.sim.debug --take-screenshots all", 36 36 "perf:test": "NODE_ENV=test maestro test", 37 37 "perf:test:run": "NODE_ENV=test maestro test __e2e__/maestro/scroll.yaml", 38 - "perf:test:measure": "NODE_ENV=test flashlight test --bundleId xyz.blueskyweb.app --testCommand 'yarn perf:test' --duration 150000 --resultsFilePath .perf/results.json", 38 + "perf:test:measure": "NODE_ENV=test flashlight test --bundleId xyz.blueskyweb.app --testCommand \"yarn perf:test\" --duration 150000 --resultsFilePath .perf/results.json", 39 39 "perf:test:results": "NODE_ENV=test flashlight report .perf/results.json", 40 40 "perf:measure": "NODE_ENV=test flashlight measure", 41 41 "intl:build": "yarn intl:extract && yarn intl:compile",