Skip to content

Commit

Permalink
Patch Gemfile
Browse files Browse the repository at this point in the history
  • Loading branch information
takameyer committed Oct 10, 2023
1 parent 70161c9 commit aca6331
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/install-test-react-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
- hermes
# See https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#xcode
xcode:
# - 14.0.1
- 13.1
- 14.2
#- 13.1
node:
# RN bumped minimum Node version: https://github.com/huntie/react-native/blob/6cb6b81dd1c6b74a0f4bac5b06fa5aef93b48fe4/CHANGELOG.md?plain=1#L15
- 18
Expand Down
8 changes: 8 additions & 0 deletions install-tests/react-native/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const __dirname = new URL(".", import.meta.url).pathname;
const DEFAULT_APP_PATH = path.resolve(__dirname, "app");
const PATCHES_PATH = path.resolve(__dirname, "patches");
const APP_JS_PATH = path.resolve(PATCHES_PATH, "App.js");
const GEMFILE_PATCH_PATH = path.resolve(PATCHES_PATH, "Gemfile.patch");
const CCACHE_PODFILE_PATCH_PATH = path.resolve(PATCHES_PATH, "ccache-Podfile.patch");
const CCACHE_PODFILE_PATCH_PATH_PRE_73 = path.resolve(PATCHES_PATH, "ccache-Podfile-pre-73.patch");
const PORT = 3000;
Expand Down Expand Up @@ -163,6 +164,13 @@ yargs(hideBin(process.argv))
path.resolve(appPath, "node_modules/react-native"),
);

// At the time of development, there was a bug with the latest Cocoapods (https://github.com/CocoaPods/CocoaPods/pull/12082)
// This patch will correct this and can most likely be removed by the time you read this.
const gemfilePath = path.resolve(appPath, "Gemfile");
console.log(`Patching Gemfile to use pin activesupport to supported version (${gemfilePath})`);

applyPatch(GEMFILE_PATCH_PATH, gemfilePath);

const podfilePath = path.resolve(appPath, "ios", "Podfile");
console.log(`Patching podfile to use ccache (${podfilePath})`);

Expand Down
7 changes: 7 additions & 0 deletions install-tests/react-native/patches/Gemfile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--- Gemfile.orig 2023-10-10 11:04:36
+++ Gemfile 2023-10-10 11:04:41
@@ -4,3 +4,4 @@
ruby ">= 2.6.10"

gem 'cocoapods', '~> 1.12'
+gem 'activesupport', '~> 7.0', '<= 7.0.8'

0 comments on commit aca6331

Please sign in to comment.