From f7b6c014e4ed33b8f7ca4632eb5e1e4423a5bd33 Mon Sep 17 00:00:00 2001 From: build Date: Fri, 1 Mar 2019 14:46:48 +0900 Subject: [PATCH 1/9] Fastlane initial setup --- .gitignore | 1 + Gemfile | 6 ++ Gemfile.lock | 171 ++++++++++++++++++++++++++++++++++++++++++++ fastlane/Appfile | 2 + fastlane/Fastfile | 57 +++++++++++++++ fastlane/Matchfile | 1 + fastlane/Pluginfile | 6 ++ fastlane/README.md | 54 ++++++++++++++ osu.iOS.props | 4 +- osu.iOS/Info.plist | 24 +++---- 10 files changed, 312 insertions(+), 14 deletions(-) create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 fastlane/Appfile create mode 100644 fastlane/Fastfile create mode 100644 fastlane/Matchfile create mode 100644 fastlane/Pluginfile create mode 100644 fastlane/README.md diff --git a/.gitignore b/.gitignore index 6186cb870d..0e2850a01c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ tools/** build/tools/** +fastlane/report.xml # Build results bin/[Dd]ebug/ diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000000..cdd3a6b349 --- /dev/null +++ b/Gemfile @@ -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) diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000000..8962cbdefe --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,171 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.0) + addressable (2.6.0) + public_suffix (>= 2.0.2, < 4.0) + atomos (0.1.3) + babosa (1.0.2) + claide (1.0.2) + colored (1.2) + colored2 (3.1.2) + commander-fastlane (4.4.6) + highline (~> 1.7.2) + declarative (0.0.10) + declarative-option (0.1.0) + digest-crc (0.4.1) + domain_name (0.5.20180417) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.7.1) + emoji_regex (1.0.1) + excon (0.62.0) + faraday (0.15.4) + multipart-post (>= 1.2, < 3) + faraday-cookie_jar (0.0.6) + faraday (>= 0.7.4) + http-cookie (~> 1.0.0) + faraday_middleware (0.13.1) + faraday (>= 0.7.4, < 1.0) + fastimage (2.1.5) + fastlane (2.116.1) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.3, < 3.0.0) + babosa (>= 1.0.2, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored + commander-fastlane (>= 4.4.6, < 5.0.0) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 2.0) + excon (>= 0.45.0, < 1.0.0) + faraday (~> 0.9) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 0.9) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-api-client (>= 0.21.2, < 0.24.0) + google-cloud-storage (>= 1.15.0, < 2.0.0) + highline (>= 1.7.2, < 2.0.0) + json (< 3.0.0) + mini_magick (~> 4.5.1) + multi_json + multi_xml (~> 0.5) + multipart-post (~> 2.0.0) + plist (>= 3.1.0, < 4.0.0) + public_suffix (~> 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) + terminal-notifier (>= 1.6.2, < 2.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.6.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-clean_testflight_testers (0.2.0) + fastlane-plugin-souyuz (0.8.1) + souyuz (>= 0.8.1) + gh_inspector (1.1.3) + 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) + signet (~> 0.9) + google-cloud-core (1.3.0) + google-cloud-env (~> 1.0) + google-cloud-env (1.0.5) + faraday (~> 0.11) + google-cloud-storage (1.16.0) + digest-crc (~> 0.4) + google-api-client (~> 0.23) + google-cloud-core (~> 1.2) + googleauth (>= 0.6.2, < 0.10.0) + googleauth (0.6.7) + faraday (~> 0.12) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (~> 0.7) + highline (1.7.10) + http-cookie (1.0.3) + domain_name (~> 0.5) + httpclient (2.8.3) + json (2.2.0) + jwt (2.1.0) + memoist (0.16.0) + mime-types (3.2.2) + mime-types-data (~> 3.2015) + mime-types-data (3.2018.0812) + mini_magick (4.5.1) + mini_portile2 (2.4.0) + multi_json (1.13.1) + multi_xml (0.6.0) + multipart-post (2.0.0) + nanaimo (0.2.6) + naturally (2.2.0) + nokogiri (1.10.1) + mini_portile2 (~> 2.4.0) + os (1.0.0) + plist (3.5.0) + public_suffix (2.0.5) + 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) + rubyzip (1.2.2) + security (0.1.3) + signet (0.11.0) + addressable (~> 2.3) + faraday (~> 0.9) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.5) + CFPropertyList + naturally + slack-notifier (2.3.2) + souyuz (0.8.1) + fastlane (>= 2.29.0) + highline (~> 1.7) + nokogiri (~> 1.7) + terminal-notifier (1.8.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + tty-cursor (0.6.1) + tty-screen (0.6.5) + tty-spinner (0.9.0) + tty-cursor (~> 0.6.0) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.5) + unicode-display_width (1.4.1) + word_wrap (1.0.0) + xcodeproj (1.8.1) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.2.6) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.0) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + ruby + +DEPENDENCIES + fastlane + fastlane-plugin-clean_testflight_testers + fastlane-plugin-souyuz + +BUNDLED WITH + 2.0.1 diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 0000000000..083de66985 --- /dev/null +++ b/fastlane/Appfile @@ -0,0 +1,2 @@ +app_identifier("sh.ppy.osulazer") # The bundle identifier of your app +apple_id("apple-dev@ppy.sh") # Your Apple email address diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 0000000000..49f47135db --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,57 @@ +update_fastlane + +default_platform(:ios) + +platform :ios do + lane :clean_dryrun do + clean_testflight_testers(days_of_inactivity:45, dry_run: true) + end + + # Specify a custom number for what's "inactive" + lane :clean do + clean_testflight_testers(days_of_inactivity: 45) # 120 days, so about 4 months + end + + lane :update_version do |options| + options[:plist_path] = '../osu.iOS/Info.plist' + app_version(options) + end + + desc 'Deploy to testflight' + lane :beta do |options| + provision( + type: 'appstore' + ) + + build( + build_configuration: 'Release', + build_platform: 'iPhone' + ) + + pilot( + skip_waiting_for_build_processing: true, + changelog: "i am woot poot", + ipa: './osu.iOS/bin/iPhone/Release/osu.iOS.ipa' + ) + end + + desc 'Compile the project' + lane :build do + souyuz( + platform: "ios", + build_target: "osu_iOS", + plist_path: "../osu.iOS/Info.plist" + ) + end + + desc 'Install provisioning profiles using match' + lane :provision do |options| + if Helper.is_ci? + # CI should not do stuff in ADP + options[:readonly] = true + end + + # update provisioning profiles + match(options) + end +end diff --git a/fastlane/Matchfile b/fastlane/Matchfile new file mode 100644 index 0000000000..40c974b09e --- /dev/null +++ b/fastlane/Matchfile @@ -0,0 +1 @@ +git_url('https://github.com/peppy/apple-certificates') diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile new file mode 100644 index 0000000000..0b4207fc5f --- /dev/null +++ b/fastlane/Pluginfile @@ -0,0 +1,6 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-clean_testflight_testers' +gem 'fastlane-plugin-souyuz' diff --git a/fastlane/README.md b/fastlane/README.md new file mode 100644 index 0000000000..70e5a52b1a --- /dev/null +++ b/fastlane/README.md @@ -0,0 +1,54 @@ +fastlane documentation +================ +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +``` +xcode-select --install +``` + +Install _fastlane_ using +``` +[sudo] gem install fastlane -NV +``` +or alternatively using `brew cask install fastlane` + +# Available Actions +## iOS +### ios clean_dryrun +``` +fastlane ios clean_dryrun +``` + +### ios clean +``` +fastlane ios clean +``` + +### ios update_version +``` +fastlane ios update_version +``` + +### ios beta +``` +fastlane ios beta +``` +Deploy to testflight +### ios build +``` +fastlane ios build +``` +Compile the project +### ios provision +``` +fastlane ios provision +``` +Install provisioning profiles using match + +---- + +This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. +More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). +The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/osu.iOS.props b/osu.iOS.props index 16eeb46683..099369f66a 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -35,7 +35,7 @@ prompt 4 - iPhone Developer + iPhone Distribution true true Entitlements.plist @@ -113,4 +113,4 @@ - \ No newline at end of file + diff --git a/osu.iOS/Info.plist b/osu.iOS/Info.plist index fe711fc03c..f0bd70b00f 100644 --- a/osu.iOS/Info.plist +++ b/osu.iOS/Info.plist @@ -2,6 +2,14 @@ + CFBundleIdentifier + sh.ppy.osulazer + CFBundleName + osu! + CFBundleShortVersionString + 0.1 + CFBundleVersion + 2019.301.0 LSRequiresIPhoneOS MinimumOSVersion @@ -17,6 +25,10 @@ armv7 + UIRequiresFullScreen + + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait @@ -26,17 +38,5 @@ XSAppIconAssets Assets.xcassets/AppIcon.appiconset - UIStatusBarHidden - - UIRequiresFullScreen - - CFBundleIdentifier - sh.ppy.osulazer - CFBundleName - osu! - CFBundleShortVersionString - 0.1 - CFBundleVersion - 0.1.1 From dd1bba5ad2a1a34882f890f3c0753980d4bfe0d4 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 1 Mar 2019 16:02:43 +0900 Subject: [PATCH 2/9] Add nuget restore --- Gemfile.lock | 2 ++ fastlane/Fastfile | 4 ++++ fastlane/Pluginfile | 1 + 3 files changed, 7 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 8962cbdefe..325c518231 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -67,6 +67,7 @@ GEM fastlane-plugin-clean_testflight_testers (0.2.0) fastlane-plugin-souyuz (0.8.1) souyuz (>= 0.8.1) + fastlane-plugin-xamarin (0.6.3) gh_inspector (1.1.3) google-api-client (0.23.9) addressable (~> 2.5, >= 2.5.1) @@ -166,6 +167,7 @@ DEPENDENCIES fastlane fastlane-plugin-clean_testflight_testers fastlane-plugin-souyuz + fastlane-plugin-xamarin BUNDLED WITH 2.0.1 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 49f47135db..b176a1c52b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -37,6 +37,10 @@ platform :ios do desc 'Compile the project' lane :build do + nuget_restore( + project_path: 'osu.iOS.sln' + ) + souyuz( platform: "ios", build_target: "osu_iOS", diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile index 0b4207fc5f..9f4f47f213 100644 --- a/fastlane/Pluginfile +++ b/fastlane/Pluginfile @@ -4,3 +4,4 @@ gem 'fastlane-plugin-clean_testflight_testers' gem 'fastlane-plugin-souyuz' +gem 'fastlane-plugin-xamarin' From 43f1099e778c6546687950552f83679ee864d07b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 1 Mar 2019 17:19:41 +0900 Subject: [PATCH 3/9] Automate change notes --- fastlane/Fastfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b176a1c52b..81d39356bd 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -28,9 +28,13 @@ platform :ios do build_platform: 'iPhone' ) + client = HTTPClient.new + changelog = client.get_content 'https://gist.githubusercontent.com/peppy/ab89c29dcc0dce95f39eb218e8fad197/raw' + changelog.gsub!('$BUILD_ID', options[:build]) + pilot( - skip_waiting_for_build_processing: true, - changelog: "i am woot poot", + wait_processing_interval: 600, + changelog: changelog, ipa: './osu.iOS/bin/iPhone/Release/osu.iOS.ipa' ) end From a6ed64754ce522ee10a63b7bb660e943ea08b530 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 1 Mar 2019 17:20:03 +0900 Subject: [PATCH 4/9] Reset bundle version --- osu.iOS/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.iOS/Info.plist b/osu.iOS/Info.plist index f0bd70b00f..0627feab78 100644 --- a/osu.iOS/Info.plist +++ b/osu.iOS/Info.plist @@ -9,7 +9,7 @@ CFBundleShortVersionString 0.1 CFBundleVersion - 2019.301.0 + 0.1.0 LSRequiresIPhoneOS MinimumOSVersion From 2dacd754a3b6e7d1a9a83dcb64645c4fcf4ab631 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 1 Mar 2019 17:20:13 +0900 Subject: [PATCH 5/9] Update fastlane version --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 325c518231..17c0db12e7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,7 +27,7 @@ GEM faraday_middleware (0.13.1) faraday (>= 0.7.4, < 1.0) fastimage (2.1.5) - fastlane (2.116.1) + fastlane (2.117.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) From c0440ca4fe6aa326a36f8c316b9fc361fb3a1781 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 1 Mar 2019 17:20:28 +0900 Subject: [PATCH 6/9] Always update version number in beta lane --- fastlane/Fastfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 81d39356bd..c33e44e877 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -19,6 +19,8 @@ platform :ios do desc 'Deploy to testflight' lane :beta do |options| + update_version(options) + provision( type: 'appstore' ) From 70d1c6fba4526e22eaf35fe4b6cde61368edee45 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 1 Mar 2019 17:37:28 +0900 Subject: [PATCH 7/9] Wait longer --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c33e44e877..78507b3aa9 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -35,7 +35,7 @@ platform :ios do changelog.gsub!('$BUILD_ID', options[:build]) pilot( - wait_processing_interval: 600, + wait_processing_interval: 900, changelog: changelog, ipa: './osu.iOS/bin/iPhone/Release/osu.iOS.ipa' ) From 0df49e6df370305155edc9498fbf31560bea5438 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 1 Mar 2019 17:37:41 +0900 Subject: [PATCH 8/9] Clean up config further --- fastlane/Fastfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 78507b3aa9..3f64bcdf19 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -3,12 +3,12 @@ update_fastlane default_platform(:ios) platform :ios do - lane :clean_dryrun do + lane :testflight_prune_dry do clean_testflight_testers(days_of_inactivity:45, dry_run: true) end # Specify a custom number for what's "inactive" - lane :clean do + lane :testflight_prune do clean_testflight_testers(days_of_inactivity: 45) # 120 days, so about 4 months end @@ -57,11 +57,9 @@ platform :ios do desc 'Install provisioning profiles using match' lane :provision do |options| if Helper.is_ci? - # CI should not do stuff in ADP options[:readonly] = true end - # update provisioning profiles match(options) end end From 521e2a30ae5ce3d8bb2f97624071426f169bcf08 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 1 Mar 2019 18:16:17 +0900 Subject: [PATCH 9/9] Update readme --- fastlane/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastlane/README.md b/fastlane/README.md index 70e5a52b1a..53bbc62cae 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -16,14 +16,14 @@ or alternatively using `brew cask install fastlane` # Available Actions ## iOS -### ios clean_dryrun +### ios testflight_prune_dry ``` -fastlane ios clean_dryrun +fastlane ios testflight_prune_dry ``` -### ios clean +### ios testflight_prune ``` -fastlane ios clean +fastlane ios testflight_prune ``` ### ios update_version