diff --git a/android/app/build.gradle b/android/app/build.gradle index e12f7f3..25a2a6c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -92,8 +92,8 @@ android { applicationId 'com.pgarr.simplenotepad' minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 13 - versionName "1.1.1" + versionCode 19 + versionName "1.4.2" buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\"" } diff --git a/app.json b/app.json index 8a5e4d6..a39683e 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "simple-notepad", "slug": "simple-notepad", - "version": "1.4.1", + "version": "1.4.2", "orientation": "portrait", "icon": "./assets/images/icon.png", "scheme": "simple-notepad", @@ -24,7 +24,7 @@ "backgroundColor": "#ffffff" }, "package": "com.pgarr.simplenotepad", - "versionCode": 18 + "versionCode": 19 }, "web": { "bundler": "metro", @@ -43,7 +43,7 @@ "projectId": "9e3820b7-558b-4bd2-a1b2-e49561e741e6" } }, - "runtimeVersion": "1.4.1", + "runtimeVersion": "1.4.2", "updates": { "url": "https://u.expo.dev/9e3820b7-558b-4bd2-a1b2-e49561e741e6" } diff --git a/package-lock.json b/package-lock.json index 20fb527..a6f913b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simple-notepad", - "version": "1.4.1", + "version": "1.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "simple-notepad", - "version": "1.4.1", + "version": "1.4.2", "dependencies": { "@react-navigation/native": "^7.0.0", "@rn-primitives/portal": "~1.3.0", diff --git a/package.json b/package.json index 33d1627..a5e2687 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "simple-notepad", "main": "expo-router/entry", - "version": "1.4.1", + "version": "1.4.2", "scripts": { "prebuild": "expo prebuild", "dev": "expo start", diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 8eeb56a..51724d3 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -6,16 +6,20 @@ TYPE=${1:-patch} # patch | minor | major # Bump package.json and capture new version NEW_VERSION=$(npm version $TYPE --no-git-tag-version | tr -d 'v') -# Sync app.json -node -e " +# Sync app.json and capture new versionCode +NEW_VERSION_CODE=$(node -e " const fs = require('fs'); const app = JSON.parse(fs.readFileSync('app.json', 'utf8')); app.expo.version = '$NEW_VERSION'; app.expo.runtimeVersion = '$NEW_VERSION'; app.expo.android = app.expo.android || {}; app.expo.android.versionCode = (app.expo.android.versionCode || 0) + 1; - const parts = '$NEW_VERSION'.split('.').map(Number); fs.writeFileSync('app.json', JSON.stringify(app, null, 2) + '\n'); -" + process.stdout.write(String(app.expo.android.versionCode)); +") -echo "Bumped to $NEW_VERSION" +# Sync android/app/build.gradle (EAS reads this when a native android/ dir exists) +sed -i "s/versionCode [0-9]*/versionCode $NEW_VERSION_CODE/" android/app/build.gradle +sed -i "s/versionName \"[^\"]*\"/versionName \"$NEW_VERSION\"/" android/app/build.gradle + +echo "Bumped to $NEW_VERSION (versionCode $NEW_VERSION_CODE)"