Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

update patch

ammarahm-ed6165a20e02b0
diff --git a/apps/mobile/patches/react-native-cli-bump-version+1.3.0.patch b/apps/mobile/patches/react-native-cli-bump-version+1.3.0.patch
new file mode 100644
index 000000000..ddadebf40
--- /dev/null
+++ b/apps/mobile/patches/react-native-cli-bump-version+1.3.0.patch
@@ -0,0 +1,56 @@
+diff --git a/node_modules/react-native-cli-bump-version/lib/index.js b/node_modules/react-native-cli-bump-version/lib/index.js
+index a319832..a6710aa 100644
+--- a/node_modules/react-native-cli-bump-version/lib/index.js
++++ b/node_modules/react-native-cli-bump-version/lib/index.js
+@@ -94,6 +94,14 @@ class BuildGradleManager extends BaseFileManager {
+ return { current, next };
+ }
+ }
++
++class VersionManager extends BaseFileManager {
++
++ setVersionCode(code) {
++ this.content = `export const APP_VERSION=${code};`;
++ }
++}
++
+ class PackageJSONManager {
+ constructor(basePath) {
+ this.content = null;
+@@ -122,6 +130,8 @@ class PackageJSONManager {
+ };
+ }
+ }
++
++
+ class ProjectFilesManager {
+ constructor(configs) {
+ const { root, pbxprojPath, buildGradlePath } = configs;
+@@ -129,7 +139,9 @@ class ProjectFilesManager {
+ this.buildGradle = new BuildGradleManager(buildGradlePath);
+ this.pbx = new PBXManager(pbxprojPath);
+ this.packageJSON = new PackageJSONManager(path_1.default.join(root, 'package.json'));
++ this.versionManager = new VersionManager(path_1.default.join(root, 'version.js'));
+ }
++
+ syncSemver(semverString) {
+ const { skipSemVerFor } = this.configs;
+ if (!skipSemVerFor.includes('ios')) {
+@@ -151,14 +163,17 @@ class ProjectFilesManager {
+ }
+ if (!skipCodeFor.includes('android')) {
+ const { next: gradleNext, current: gradleCurrent } = this.buildGradle.bumpCode();
++ this.versionManager.setVersionCode(gradleNext);
+ console.log(success(`Android build.gradle code: ${gradleCurrent} -> ${gradleNext}`));
+ }
++
+ }
+ run() {
+ this.dryRun();
+ this.pbx.write();
+ this.buildGradle.write();
+ this.packageJSON.write();
++ this.versionManager.write();
+ }
+ /**
+ * Separated for testing