Skip to content

Commit

Permalink
feat: iOS Fastlane config
Browse files Browse the repository at this point in the history
  • Loading branch information
tsyirvo committed Dec 26, 2020
1 parent 0fc2cc7 commit 474df51
Show file tree
Hide file tree
Showing 11 changed files with 741 additions and 231 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ buck-out/
*/fastlane/Preview.html
*/fastlane/screenshots
*/fastlane/README.md
*/fastlane/.env

# Bundle artifact
*.jsbundle
Expand Down
47 changes: 47 additions & 0 deletions .versionrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const iOSVersionRegexp = /(<key>CFBundleShortVersionString<\/key>\s*?<string>)(\d+\.\d+\.\d+)(<\/string>)/;
const androidVersionRegexp = /(versionName ")(\d+\.\d+\.\d+)(")/;

const regexpUpdater = (regexp) => {
return {
readVersion: (content) => {
const match = content.match(regexp);

if (!match) {
throw new Error('Could not read version from project');
}

return match[2];
},
writeVersion: (content, version) => {
return content.replace(regexp, `$1${version}$3`);
},
};
};

const iOSUpdater = regexpUpdater(iOSVersionRegexp);
const androidUpdater = regexpUpdater(androidVersionRegexp);

module.exports = {
releaseCommitMessageFormat: 'chore(release): v{{currentTag}} [skip ci]',
bumpFiles: [
{
filename: 'package.json',
},
{
filename: 'ios/development-Info.plist',
updater: iOSUpdater,
},
{
filename: 'ios/staging-Info.plist',
updater: iOSUpdater,
},
{
filename: 'ios/rnStarter/Info.plist',
updater: iOSUpdater,
},
{
filename: 'android/app/build.gradle',
updater: androidUpdater,
},
],
};
15 changes: 0 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +0,0 @@
# Changelog

All notable changes to this project will be documented in this file.

# 1.1.0 iOS Production (2020-09-14)

### Features

- update the versionning handling for iOS ([ba94615](https://github.com/tsyirvo/react-native-starter/commit/ba9461535860a94d2ea28e5f493a9bf2c33e63e2))# 1.1.0 - Android Production (2020-09-14)

# 1.1.0 Android Production (2020-09-14)

### Features

- add Fastlane versionning for Android ([245a276](https://github.com/tsyirvo/react-native-starter/commit/245a276e7b9ff3784393e40b9e80d09d7d85734a))
9 changes: 9 additions & 0 deletions android/fastlane/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### ANDROID CONFIG ###
ANDROID_PACKAGE_ID='com.rnstarter.staging'
ANDROID_JSON_KEY=''

### APP CENTER ###
APPCENTER_API_TOKEN=''
APPCENTER_OWNER_TYPE='' ## user or organization
APPCENTER_OWNER_NAME='' ## URL of the account in App Center
APPCENTER_APP_NAME='' ## URL of the app in App Center
48 changes: 25 additions & 23 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.2)
CFPropertyList (3.0.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.368.0)
aws-sdk-core (3.105.0)
aws-partitions (1.413.0)
aws-sdk-core (3.110.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.37.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sdk-kms (1.40.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.80.0)
aws-sdk-core (~> 3, >= 3.104.3)
aws-sdk-s3 (1.87.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.3)
babosa (1.0.4)
claide (1.0.3)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
declarative (0.0.20)
declarative-option (0.1.0)
digest-crc (0.6.1)
rake (~> 13.0)
digest-crc (0.6.3)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.0.0)
excon (0.76.0)
faraday (1.0.1)
emoji_regex (3.2.1)
excon (0.78.1)
faraday (1.2.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.0)
fastlane (2.159.0)
fastlane (2.170.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
Expand Down Expand Up @@ -80,7 +81,7 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-appcenter (1.9.0)
fastlane-plugin-appcenter (1.11.0)
fastlane-plugin-semantic_release (1.12.0)
fastlane-plugin-versioning (0.4.4)
gh_inspector (1.1.3)
Expand All @@ -95,17 +96,17 @@ GEM
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.3)
google-cloud-env (1.4.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.28.0)
google-cloud-storage (1.29.2)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.13.1)
googleauth (0.14.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand All @@ -117,10 +118,10 @@ GEM
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
json (2.3.1)
json (2.5.1)
jwt (2.2.2)
memoist (0.16.2)
mini_magick (4.10.1)
mini_magick (4.11.0)
mini_mime (1.0.2)
multi_json (1.15.0)
multipart-post (2.0.0)
Expand All @@ -129,13 +130,14 @@ GEM
os (1.1.1)
plist (3.5.0)
public_suffix (4.0.6)
rake (13.0.1)
rake (13.0.3)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
ruby2_keywords (0.0.2)
rubyzip (2.3.0)
security (0.1.3)
signet (0.14.0)
Expand All @@ -160,7 +162,7 @@ GEM
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.18.0)
xcodeproj (1.19.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -181,4 +183,4 @@ DEPENDENCIES
fastlane-plugin-versioning

BUNDLED WITH
2.1.4
2.2.3
19 changes: 19 additions & 0 deletions ios/fastlane/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### IOS CONFIG ###
IOS_APP_ID='ninja.gab.rnStarter' ## The app base Bundle ID
IOS_APPLE_ID='' ## Email address associated to the Apple account
IOS_TEAM_ID='' ## App Store Connect Team ID
IOS_ITC_TEAM_NAME='' ## Developer Portal Team ID

### IOS PROJECT ###
IOS_WORKSPACE='rnStarter.xcworkspace'
IOS_XCODEPROJ='rnStarter.xcodeproj'

### IOS MATCH ###
MATCH_GIT_URL='' ## Repo storing the Code Signing
MATCH_PASSWORD='' ## Passphrase securing the repo

### APP CENTER ###
APPCENTER_API_TOKEN=''
APPCENTER_OWNER_TYPE='' ## user or organization
APPCENTER_OWNER_NAME='' ## URL of the account in App Center
APPCENTER_APP_NAME='' ## URL of the app in App Center
Loading

0 comments on commit 474df51

Please sign in to comment.