Skip to content

Commit

Permalink
feat(fastlane): update android regex
Browse files Browse the repository at this point in the history
  • Loading branch information
crherman7 committed Mar 11, 2024
1 parent dfbe2c9 commit 3274d2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-fastlane/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ eval_gemfile(plugins_path) if File.exist?(plugins_path)

await fsk.update(
pathk.project.resolve("android", "app", "build.gradle"),
/(signingConfigs\s*{\s*)/m,
`$1release {
/(signingConfigs[.\s\S]+?release \{)[.\s\S]+?\}/m,
`$1
storeFile file('release.keystore')
storePassword System.getenv("STORE_PASSWORD")
keyAlias '${config.android.signing.keyAlias}'
Expand Down
10 changes: 10 additions & 0 deletions packages/plugin-fastlane/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,18 @@ describe("plugin-fastlane", () => {
await fs.readFile(path.project.resolve("android", "fastlane", "Fastfile"))
).toString();

const appBuildGradle = (
await fs.readFile(path.project.resolve("android", "app", "build.gradle"))
).toString();

androidCases.forEach(function (testCase) {
expect(result).toMatch(testCase);
});

expect(appBuildGradle).toContain(`{
storeFile file('release.keystore')
storePassword System.getenv("STORE_PASSWORD")
keyAlias 'key0'
keyPassword System.getenv("KEY_PASSWORD")`);
});
});

0 comments on commit 3274d2a

Please sign in to comment.