Skip to content

Commit

Permalink
feat(fastlane): Setup fastlane for ios release
Browse files Browse the repository at this point in the history
  • Loading branch information
gfanton committed Sep 26, 2018
1 parent 6ddc1af commit 75cbc8c
Show file tree
Hide file tree
Showing 15 changed files with 114 additions and 83 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ gin-bin

# sub projects
/depviz/

# version
./package.json
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ lint-editorconfig:
echo "Checking if $$COUNT files comply with EditorConfig rules..."; \
eclint check $$FILES


.PHONY: version
version: version.init $(PACKAGES)


.PHONY: _ci_prepare
_ci_prepare:
cd core && make _ci_prepare
Expand Down
6 changes: 6 additions & 0 deletions client/react-native/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

gem "fastlane"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GEM
CFPropertyList (3.0.0)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.2)
atomos (0.1.3)
babosa (1.0.2)
claide (1.0.2)
colored (1.2)
Expand All @@ -18,15 +18,15 @@ GEM
dotenv (2.5.0)
emoji_regex (0.1.1)
excon (0.62.0)
faraday (0.15.2)
faraday (0.15.3)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.12.2)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.3)
fastlane (2.101.1)
fastimage (2.1.4)
fastlane (2.105.2)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
Expand All @@ -50,7 +50,7 @@ GEM
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.2.1, < 2.0.0)
rubyzip (>= 1.2.2, < 2.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
Expand All @@ -59,18 +59,20 @@ GEM
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.5.7, < 2.0.0)
xcpretty (~> 0.2.8)
xcodeproj (>= 1.6.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-increment_version_code (0.4.3)
gh_inspector (1.1.3)
google-api-client (0.23.4)
google-api-client (0.23.9)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
httpclient (>= 2.8.1, < 3.0)
mime-types (~> 3.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
googleauth (0.6.3)
signet (~> 0.9)
googleauth (0.6.6)
faraday (~> 0.12)
jwt (>= 1.4, < 3.0)
memoist (~> 0.12)
Expand All @@ -84,9 +86,9 @@ GEM
json (2.1.0)
jwt (2.1.0)
memoist (0.16.0)
mime-types (3.1)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mime-types-data (3.2018.0812)
mini_magick (4.5.1)
multi_json (1.13.1)
multi_xml (0.6.0)
Expand All @@ -102,9 +104,9 @@ GEM
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
rubyzip (1.2.1)
rubyzip (1.2.2)
security (0.1.3)
signet (0.8.1)
signet (0.10.0)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
Expand All @@ -126,13 +128,13 @@ GEM
unf_ext (0.0.7.5)
unicode-display_width (1.4.0)
word_wrap (1.0.0)
xcodeproj (1.5.9)
xcodeproj (1.6.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.2)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.5)
xcpretty (0.2.8)
nanaimo (~> 0.2.6)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)
Expand All @@ -142,6 +144,7 @@ PLATFORMS

DEPENDENCIES
fastlane
fastlane-plugin-increment_version_code

BUNDLED WITH
1.16.2
44 changes: 42 additions & 2 deletions client/react-native/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
IOS_VERSION ?= $(shell git describe --tags --always | cut -d - -f 1,2 | tr - .| tail -c +2)
ANDROID_VERSION ?= $(shell git rev-list --all --count)
XCODE_MAJOR := $(shell xcodebuild -version | head -1 | sed 's~^Xcode \(.*\)\..*$$~\1~')

PWD := $(shell pwd)
ROOT := $(PWD)
DIRS := common mobile web gomobile
Expand All @@ -6,8 +10,11 @@ CLEAN := $(addsuffix .clean, $(DIRS) $(ROOT))
FCLEAN := $(addsuffix .fclean, $(DIRS) $(ROOT))
RE := $(addsuffix .re, $(DIRS) $(ROOT))
START := $(addsuffix .start, $(DIRS) $(ROOT))
BUILD := $(addsuffix .build, $(DIRS) $(ROOT))
XCODE_MAJOR := $(shell xcodebuild -version | head -1 | sed 's~^Xcode \(.*\)\..*$$~\1~')

BUILD := .build
BUILD_IOS := $(BUILD)/ios
BUILD_ANDROID := $(BUILD)/android

SCALE ?= 1
PORT ?= 0

Expand Down Expand Up @@ -117,3 +124,36 @@ webapp.rm:
COUNT=$$(echo "$$CONT_ID" | sed '/^\s*$$/d' | wc -w | tr -d ' '); \
echo "Deleting $$COUNT previously generated containers..."; \
if [ $$COUNT -ne 0 ]; then docker rm $$CONT_ID; fi

.PHONY: version
version:
plutil -replace CFBundleShortVersionString -string $(IOS_VERSION) mobile/ios/berty/Info.plist
bundle exec fastlane run increment_version_code version_code:${ANDROID_VERSION} gradle_file_path:./mobile/android/app/build.gradle


fastlane.create_temporary_keychain:
time bundle exec fastlane run create_keychain timeout:3600 default_keychain:true unlock:true add_to_search_list:true
time bundle exec fastlane run sh "security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k #{ENV["KEYCHAIN_NAME"]} #{ENV["KEYCHAIN_PASSWORD"]}"

fastlane.match.development:
time bundle exec fastlane run match type:development readonly:true

fastlane.match.adhoc:
time bundle exec fastlane run match type:adhoc readonly:true

fastlane.match.appstore:
time bundle exec fastlane run match type:appstore readonly:true

fastlane.ios.build.release: fastlane.match.appstore
mkdir -p $(BUILD_IOS)
time bundle exec fastlane run gym --verbose \
clean:true \
export_method:app-store \
output_name:berty \
output_directory:$(BUILD_IOS) \
project:mobile/ios/berty.xcodeproj \
scheme:release \
include_symbols:false

fastlane.ios.release:
time bundle exec fastlane run pilot upload --verbose
File renamed without changes.
5 changes: 5 additions & 0 deletions client/react-native/fastlane/Pluginfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-increment_version_code'
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ or alternatively using `brew cask install fastlane`

# Available Actions
## iOS
### ios custom_lane
### ios certificates
```
fastlane ios custom_lane
fastlane ios certificates
```
Description of what the lane does
Installs the certificates and profiles locally
### ios adhoc
```
fastlane ios adhoc
```
Ad-hoc build
Submit a new Alpha Build to Fabric

Submit a new build to iTunes Connect

----

Expand Down
3 changes: 0 additions & 3 deletions client/react-native/mobile/ios/Gemfile

This file was deleted.

13 changes: 7 additions & 6 deletions client/react-native/mobile/ios/berty.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 7A4249AYMN;
DevelopmentTeam = WMBQ84HN4T;
LastSwiftMigration = 0940;
ProvisioningStyle = Manual;
};
Expand Down Expand Up @@ -1378,11 +1378,12 @@
ALWAYS_SEARCH_USER_PATHS = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: HAL moonwatcher (PAR59Y84D3)";
CODE_SIGN_IDENTITY = "iPhone Developer: developer berty (45Q75FHGN2)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: developer berty (45Q75FHGN2)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 7A4249AYMN;
DEVELOPMENT_TEAM = WMBQ84HN4T;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1417,11 +1418,11 @@
ALWAYS_SEARCH_USER_PATHS = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: HAL moonwatcher (PAR59Y84D3)";
CODE_SIGN_IDENTITY = "iPhone Distribution: Berty technologies (WMBQ84HN4T)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Berty technologies (WMBQ84HN4T)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 7A4249AYMN;
DEVELOPMENT_TEAM = WMBQ84HN4T;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0620"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
Expand All @@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
BuildableName = "libReact.a"
BlueprintName = "React-tvOS"
BlueprintName = "React"
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -28,23 +28,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "berty-tvOS.app"
BlueprintName = "berty-tvOS"
ReferencedContainer = "container:berty.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "berty-tvOSTests.xctest"
BlueprintName = "berty-tvOSTests"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "berty.app"
BlueprintName = "berty"
ReferencedContainer = "container:berty.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -56,33 +42,23 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "berty-tvOSTests.xctest"
BlueprintName = "berty-tvOSTests"
ReferencedContainer = "container:berty.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "berty-tvOS.app"
BlueprintName = "berty-tvOS"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "berty.app"
BlueprintName = "berty"
ReferencedContainer = "container:berty.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
buildConfiguration = "Release"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -93,9 +69,9 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "berty-tvOS.app"
BlueprintName = "berty-tvOS"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "berty.app"
BlueprintName = "berty"
ReferencedContainer = "container:berty.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand All @@ -112,9 +88,9 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "berty-tvOS.app"
BlueprintName = "berty-tvOS"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "berty.app"
BlueprintName = "berty"
ReferencedContainer = "container:berty.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand Down
2 changes: 1 addition & 1 deletion client/react-native/mobile/ios/berty/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
7 changes: 0 additions & 7 deletions client/react-native/mobile/ios/fastlane/Matchfile

This file was deleted.

0 comments on commit 75cbc8c

Please sign in to comment.