Skip to content

Commit 6f5f935

Browse files
authored
Merge pull request #107 from Resgrid/develop
CU-868cu9311 Quick version update
2 parents d13a691 + 46b4cad commit 6f5f935

3 files changed

Lines changed: 64 additions & 15 deletions

File tree

.github/workflows/react-native-cicd.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,29 @@ jobs:
146146
run: |
147147
echo $UNIT_GOOGLE_SERVICES | base64 -d > google-services.json
148148
149+
- name: 📋 Update package.json Versions
150+
run: |
151+
# Check if jq is installed, if not install it
152+
if ! command -v jq &> /dev/null; then
153+
echo "Installing jq..."
154+
sudo apt-get update && sudo apt-get install -y jq
155+
fi
156+
157+
# Fix the main entry in package.json
158+
if [ -f ./package.json ]; then
159+
# Create a backup
160+
cp package.json package.json.bak
161+
# Update the package.json
162+
jq '.version = "7.${{ github.run_number }}"' package.json > package.json.tmp && mv package.json.tmp package.json
163+
jq '.versionCode = "7${{ github.run_number }}"' package.json > package.json.tmp && mv package.json.tmp package.json
164+
echo "Updated package.json versions"
165+
cat package.json | grep "version"
166+
cat package.json | grep "versionCode"
167+
else
168+
echo "package.json not found"
169+
exit 1
170+
fi
171+
149172
- name: 📱 Setup EAS build cache
150173
uses: actions/cache@v3
151174
with:
@@ -176,47 +199,47 @@ jobs:
176199
run: |
177200
# Build with increased memory limit
178201
export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096"
179-
eas build --platform android --profile development --local --non-interactive --output=./app-dev.apk
202+
eas build --platform android --profile development --local --non-interactive --output=./ResgridUnit-dev.apk
180203
env:
181204
NODE_ENV: development
182205

183206
- name: 📱 Build Production APK
184207
if: (matrix.platform == 'android' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'prod-apk'))
185208
run: |
186209
export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096"
187-
eas build --platform android --profile production-apk --local --non-interactive --output=./app-prod.apk
210+
eas build --platform android --profile production-apk --local --non-interactive --output=./ResgridUnit-prod.apk
188211
env:
189212
NODE_ENV: production
190213

191214
- name: 📱 Build Production AAB
192215
if: (matrix.platform == 'android' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'prod-aab'))
193216
run: |
194217
export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096"
195-
eas build --platform android --profile production --local --non-interactive --output=./app-prod.aab
218+
eas build --platform android --profile production --local --non-interactive --output=./ResgridUnit-prod.aab
196219
env:
197220
NODE_ENV: production
198221

199222
- name: 📱 Build iOS Development
200223
if: (matrix.platform == 'ios' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-dev'))
201224
run: |
202225
export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096"
203-
eas build --platform ios --profile development --local --non-interactive --output=./app-ios-dev.ipa
226+
eas build --platform ios --profile development --local --non-interactive --output=./ResgridUnit-ios-dev.ipa
204227
env:
205228
NODE_ENV: development
206229

207230
- name: 📱 Build iOS Ad-Hoc
208231
if: (matrix.platform == 'ios' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-adhoc'))
209232
run: |
210233
export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096"
211-
eas build --platform ios --profile internal --local --non-interactive --output=./app-ios-adhoc.ipa
234+
eas build --platform ios --profile internal --local --non-interactive --output=./ResgridUnit-ios-adhoc.ipa
212235
env:
213236
NODE_ENV: production
214237

215238
- name: 📱 Build iOS Production
216239
if: (matrix.platform == 'ios' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-prod'))
217240
run: |
218241
export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096"
219-
eas build --platform ios --profile production --local --non-interactive --output=./app-ios-prod.ipa
242+
eas build --platform ios --profile production --local --non-interactive --output=./ResgridUnit-ios-prod.ipa
220243
env:
221244
NODE_ENV: production
222245

@@ -225,9 +248,10 @@ jobs:
225248
with:
226249
name: app-builds
227250
path: |
228-
./app-dev.apk
229-
./app-prod.apk
230-
./app-prod.aab
231-
./app-ios-dev.app
232-
./app-ios-prod.ipa
251+
./ResgridUnit-dev.apk
252+
./ResgridUnit-prod.apk
253+
./ResgridUnit-prod.aab
254+
./ResgridUnit-ios-dev.ipa
255+
./ResgridUnit-ios-adhoc.ipa
256+
./ResgridUnit-ios-prod.ipa
233257
retention-days: 7

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"@microsoft/signalr": "~8.0.7",
8484
"@novu/react-native": "~2.6.6",
8585
"@rnmapbox/maps": "~10.1.33",
86+
"@semantic-release/git": "^10.0.1",
8687
"@sentry/react-native": "~6.10.0",
8788
"@shopify/flash-list": "1.7.3",
8889
"@tanstack/react-query": "~5.52.1",

yarn.lock

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3565,6 +3565,25 @@
35653565
component-type "^1.2.1"
35663566
join-component "^1.1.0"
35673567

3568+
"@semantic-release/error@^3.0.0":
3569+
version "3.0.0"
3570+
resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-3.0.0.tgz#30a3b97bbb5844d695eb22f9d3aa40f6a92770c2"
3571+
integrity sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==
3572+
3573+
"@semantic-release/git@^10.0.1":
3574+
version "10.0.1"
3575+
resolved "https://registry.yarnpkg.com/@semantic-release/git/-/git-10.0.1.tgz#c646e55d67fae623875bf3a06a634dd434904498"
3576+
integrity sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==
3577+
dependencies:
3578+
"@semantic-release/error" "^3.0.0"
3579+
aggregate-error "^3.0.0"
3580+
debug "^4.0.0"
3581+
dir-glob "^3.0.0"
3582+
execa "^5.0.0"
3583+
lodash "^4.17.4"
3584+
micromatch "^4.0.0"
3585+
p-reduce "^2.0.0"
3586+
35683587
"@sentry-internal/browser-utils@8.54.0":
35693588
version "8.54.0"
35703589
resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.54.0.tgz#2d68c7fa843db867ed98059faf1a750be3eca95a"
@@ -6247,7 +6266,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.6.9:
62476266
dependencies:
62486267
ms "2.0.0"
62496268

6250-
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.7, debug@^4.4.0, debug@~4.4.0:
6269+
debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.7, debug@^4.4.0, debug@~4.4.0:
62516270
version "4.4.1"
62526271
resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b"
62536272
integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==
@@ -6439,7 +6458,7 @@ diff@^4.0.1:
64396458
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
64406459
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
64416460

6442-
dir-glob@^3.0.1:
6461+
dir-glob@^3.0.0, dir-glob@^3.0.1:
64436462
version "3.0.1"
64446463
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
64456464
integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
@@ -10277,7 +10296,7 @@ lodash.zip@^4.2.0:
1027710296
resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020"
1027810297
integrity sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==
1027910298

10280-
lodash@^4.17.12, lodash@^4.17.19, lodash@^4.17.21:
10299+
lodash@^4.17.12, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.4:
1028110300
version "4.17.21"
1028210301
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
1028310302
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -10697,7 +10716,7 @@ metro@0.81.5, metro@^0.81.0:
1069710716
ws "^7.5.10"
1069810717
yargs "^17.6.2"
1069910718

10700-
micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5, micromatch@^4.0.8, micromatch@~4.0.8:
10719+
micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5, micromatch@^4.0.8, micromatch@~4.0.8:
1070110720
version "4.0.8"
1070210721
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
1070310722
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
@@ -11440,6 +11459,11 @@ p-memoize@^7.1.1:
1144011459
mimic-fn "^4.0.0"
1144111460
type-fest "^3.0.0"
1144211461

11462+
p-reduce@^2.0.0:
11463+
version "2.1.0"
11464+
resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a"
11465+
integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==
11466+
1144311467
p-timeout@^6.1.2:
1144411468
version "6.1.4"
1144511469
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-6.1.4.tgz#418e1f4dd833fa96a2e3f532547dd2abdb08dbc2"

0 commit comments

Comments
 (0)