Skip to content

Commit 46a9671

Browse files
authored
Merge pull request #51605 from Expensify/AndrewGable-cherry-pick-staging-51602-1
🍒 Cherry pick PR #51602 to staging 🍒
2 parents 180a8b2 + dd7301e commit 46a9671

File tree

7 files changed

+97
-8
lines changed

7 files changed

+97
-8
lines changed

.github/workflows/createNewVersion.yml

+89
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,92 @@ jobs:
101101
uses: ./.github/actions/composite/announceFailedWorkflowInSlack
102102
with:
103103
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
104+
105+
createNewHybridVersion:
106+
runs-on: macos-latest
107+
needs: [validateActor, createNewVersion]
108+
if: ${{ fromJSON(needs.validateActor.outputs.HAS_WRITE_ACCESS) }}
109+
defaults:
110+
run:
111+
working-directory: Mobile-Expensify
112+
steps:
113+
- name: Run turnstyle
114+
uses: softprops/turnstyle@49108bdfa571e62371bd2c3094893c547ab3fc03
115+
with:
116+
poll-interval-seconds: 10
117+
env:
118+
GITHUB_TOKEN: ${{ github.token }}
119+
120+
- name: Check out `App` repo
121+
uses: actions/checkout@v4
122+
with:
123+
ref: main
124+
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify
125+
# This is a workaround to allow pushes to a protected branch
126+
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
127+
128+
- name: Check out `Mobile-Expensify` repo
129+
uses: actions/checkout@v4
130+
with:
131+
repository: 'Expensify/Mobile-Expensify'
132+
submodules: true
133+
path: 'Mobile-Expensify'
134+
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
135+
136+
- name: Update submodule
137+
run: |
138+
cd react-native
139+
git submodule update --init
140+
141+
- name: Setup git for OSBotify
142+
uses: ./.github/actions/composite/setupGitForOSBotify
143+
id: setupGitForOSBotify
144+
with:
145+
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
146+
147+
- name: Generate HybridApp version
148+
run: |
149+
# Generate all flavors of the version
150+
SHORT_APP_VERSION=$(echo "$NEW_VERSION" | awk -F'-' '{print $1}')
151+
BUILD_NUMBER=$(echo "$NEW_VERSION" | awk -F'-' '{print $2}')
152+
FULL_APP_VERSION="$SHORT_APP_VERSION.$BUILD_NUMBER"
153+
ANDROID_VERSION_CODE=$(echo "$FULL_APP_VERSION" | ruby -e "puts '05%02d%02d%02d%02d' % STDIN.read.split('.')")
154+
155+
# File paths to update
156+
ANDROID_MANIFEST_FILE="Android/AndroidManifest.xml"
157+
IOS_INFO_PLIST_FILE="iOS/Expensify/Expensify-Info.plist"
158+
IOS_SHARE_EXTENSION_PLIST_FILE="iOS/SmartScanExtension/Info.plist"
159+
JS_CONFIG_FILE="app/config/config.json"
160+
161+
# Update Android HybridApp Version
162+
sed -i .bak -E "s/versionName=\"([0-9\.]*)\"/versionName=\"$FULL_APP_VERSION\"/" $ANDROID_MANIFEST_FILE
163+
sed -i .bak -E "s/versionCode=\"([0-9]*)\"/versionCode=\"$ANDROID_VERSION_CODE\"/" $ANDROID_MANIFEST_FILE
164+
165+
# Update iOS HybridApp Version
166+
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $SHORT_APP_VERSION" $IOS_INFO_PLIST_FILE
167+
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $FULL_APP_VERSION" $IOS_INFO_PLIST_FILE
168+
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $SHORT_APP_VERSION" $IOS_SHARE_EXTENSION_PLIST_FILE
169+
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $FULL_APP_VERSION" $IOS_SHARE_EXTENSION_PLIST_FILE
170+
171+
# Update JS HybridApp Version
172+
sed -i .bak -E "s/\"version\": \"([0-9\.]*)\"/\"version\": \"$FULL_APP_VERSION\"/" $JS_CONFIG_FILE
173+
env:
174+
NEW_VERSION: ${{ needs.createNewVersion.outputs.NEW_VERSION }}
175+
176+
- name: Commit new version
177+
run: |
178+
git add \
179+
./Android/AndroidManifest.xml \
180+
./app/config/config.json \
181+
./iOS/Expensify/Expensify-Info.plist\
182+
./iOS/SmartScanExtension/Info.plist
183+
git commit -m "Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
184+
185+
- name: Update main branch
186+
run: git push origin main
187+
188+
- name: Announce failed workflow in Slack
189+
if: ${{ failure() }}
190+
uses: ./.github/actions/composite/announceFailedWorkflowInSlack
191+
with:
192+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ android {
110110
minSdkVersion rootProject.ext.minSdkVersion
111111
targetSdkVersion rootProject.ext.targetSdkVersion
112112
multiDexEnabled rootProject.ext.multiDexEnabled
113-
versionCode 1009005402
114-
versionName "9.0.54-2"
113+
versionCode 1009005406
114+
versionName "9.0.54-6"
115115
// Supported language variants must be declared here to avoid from being removed during the compilation.
116116
// This also helps us to not include unnecessary language variants in the APK.
117117
resConfigs "en", "es"

ios/NewExpensify/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</dict>
4141
</array>
4242
<key>CFBundleVersion</key>
43-
<string>9.0.54.2</string>
43+
<string>9.0.54.6</string>
4444
<key>FullStory</key>
4545
<dict>
4646
<key>OrgId</key>

ios/NewExpensifyTests/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>9.0.54.2</string>
22+
<string>9.0.54.6</string>
2323
</dict>
2424
</plist>

ios/NotificationServiceExtension/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.0.54</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.0.54.2</string>
16+
<string>9.0.54.6</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "9.0.54-2",
3+
"version": "9.0.54-6",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",

0 commit comments

Comments
 (0)