From 914884660b856fbbaa0cce8d1cdb50901d42853e Mon Sep 17 00:00:00 2001 From: Mingshen Sun Date: Sat, 25 Jul 2020 00:34:31 -0700 Subject: [PATCH] Fix CI bulding issues --- .travis.yml | 2 +- Gemfile.lock | 20 ++++++------ fastlane/Fastfile | 78 ++++++++++++++++++++++++++++++++++------------ fastlane/Matchfile | 2 -- gopenpgp_build.sh | 8 +++-- 5 files changed, 74 insertions(+), 36 deletions(-) delete mode 100644 fastlane/Matchfile diff --git a/.travis.yml b/.travis.yml index e5b2e0d..5dca7b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode11.4 +osx_image: xcode11.6 addons: homebrew: packages: diff --git a/Gemfile.lock b/Gemfile.lock index 2b94d92..76f4a47 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,8 +6,8 @@ GEM public_suffix (>= 2.0.2, < 5.0) atomos (0.1.3) aws-eventstream (1.1.0) - aws-partitions (1.343.0) - aws-sdk-core (3.104.0) + aws-partitions (1.345.0) + aws-sdk-core (3.104.3) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) @@ -15,8 +15,8 @@ GEM aws-sdk-kms (1.36.0) aws-sdk-core (~> 3, >= 3.99.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.74.0) - aws-sdk-core (~> 3, >= 3.102.1) + aws-sdk-s3 (1.75.0) + aws-sdk-core (~> 3, >= 3.104.1) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) aws-sigv4 (1.2.1) @@ -36,15 +36,15 @@ GEM dotenv (2.7.6) emoji_regex (3.0.0) excon (0.75.0) - faraday (0.17.3) + faraday (1.0.1) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) http-cookie (~> 1.0.0) - faraday_middleware (0.14.0) - faraday (>= 0.7.4, < 1.0) + faraday_middleware (1.0.0) + faraday (~> 1.0) fastimage (2.1.7) - fastlane (2.152.0) + fastlane (2.153.1) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) aws-sdk-s3 (~> 1.0) @@ -55,9 +55,9 @@ GEM dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) excon (>= 0.71.0, < 1.0.0) - faraday (>= 0.17, < 1.0) + faraday (~> 1.0) faraday-cookie_jar (~> 0.0.6) - faraday_middleware (>= 0.13.1, < 2.0) + faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) google-api-client (>= 0.37.0, < 0.39.0) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d280f5a..c0398bd 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -17,6 +17,42 @@ lane :match_development do app_identifier = "me.mssun.passforios" match( type: "development", + git_url: "https://github.com/mssun/certificates-passforios", + git_basic_authorization: ENV['MATCH_GIT_BASIC_AUTHORIZATION'], + keychain_name: ENV["MATCH_KEYCHAIN_NAME"], + keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"], + app_identifier: [app_identifier, + "#{app_identifier}.find-login-action-extension", + "#{app_identifier}.auto-fill-credential-extension", + "#{app_identifier}.shortcuts"], + readonly: true + ) +end + +lane :match_appstore do + app_identifier = "me.mssun.passforios" + match( + type: "appstore", + git_url: "https://github.com/mssun/certificates-passforios", + git_basic_authorization: ENV['MATCH_GIT_BASIC_AUTHORIZATION'], + keychain_name: ENV["MATCH_KEYCHAIN_NAME"], + keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"], + app_identifier: [app_identifier, + "#{app_identifier}.find-login-action-extension", + "#{app_identifier}.auto-fill-credential-extension", + "#{app_identifier}.shortcuts"], + readonly: true + ) +end + +lane :match_appstore_beta do + app_identifier = "me.mssun.passforiosbeta" + match( + type: "appstore", + git_url: "https://github.com/mssun/certificates-passforios", + git_basic_authorization: ENV['MATCH_GIT_BASIC_AUTHORIZATION'], + keychain_name: ENV["MATCH_KEYCHAIN_NAME"], + keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"], app_identifier: [app_identifier, "#{app_identifier}.find-login-action-extension", "#{app_identifier}.auto-fill-credential-extension", @@ -44,16 +80,7 @@ platform :ios do timeout: 3600, add_to_search_list: true ) - match( - type: "appstore", - app_identifier: [app_identifier, - "#{app_identifier}.find-login-action-extension", - "#{app_identifier}.auto-fill-credential-extension", - "#{app_identifier}.shortcuts"], - keychain_name: ENV["MATCH_KEYCHAIN_NAME"], - keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"], - readonly: true - ) + match_appstore_beta increment_build_number( build_number: latest_testflight_build_number( version: get_version_number(target: "pass"), @@ -65,6 +92,16 @@ platform :ios do build_app( scheme: "pass", configuration: "Beta", + skip_profile_detection: true, + export_options: { + method: "app-store", + provisioningProfiles: { + app_identifier => "match AppStore #{app_identifier}", + "#{app_identifier}.find-login-action-extension" => "match AppStore #{app_identifier}.find-login-action-extension", + "#{app_identifier}.auto-fill-credential-extension" => "match AppStore #{app_identifier}.auto-fill-credential-extension", + "#{app_identifier}.shortcuts" => "match AppStore #{app_identifier}.shortcuts", + }, + }, verbose: true ) upload_to_testflight( @@ -88,16 +125,7 @@ platform :ios do timeout: 3600, add_to_search_list: true ) - match( - type: "appstore", - app_identifier: [app_identifier, - "#{app_identifier}.find-login-action-extension", - "#{app_identifier}.auto-fill-credential-extension", - "#{app_identifier}.shortcuts"], - keychain_name: ENV["MATCH_KEYCHAIN_NAME"], - keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"], - readonly: true - ) + match_appstore increment_build_number( build_number: latest_testflight_build_number( version: get_version_number(target: "pass"), @@ -109,6 +137,16 @@ platform :ios do build_app( scheme: "pass", configuration: "Release", + skip_profile_detection: true, + export_options: { + method: "app-store", + provisioningProfiles: { + app_identifier => "match AppStore #{app_identifier}", + "#{app_identifier}.find-login-action-extension" => "match AppStore #{app_identifier}.find-login-action-extension", + "#{app_identifier}.auto-fill-credential-extension" => "match AppStore #{app_identifier}.auto-fill-credential-extension", + "#{app_identifier}.shortcuts" => "match AppStore #{app_identifier}.shortcuts", + }, + }, verbose: true ) upload_to_testflight( diff --git a/fastlane/Matchfile b/fastlane/Matchfile deleted file mode 100644 index 249baae..0000000 --- a/fastlane/Matchfile +++ /dev/null @@ -1,2 +0,0 @@ -git_url "https://github.com/mssun/certificates-passforios.git" -type "development" diff --git a/gopenpgp_build.sh b/gopenpgp_build.sh index 2958a6b..b4bd7cb 100755 --- a/gopenpgp_build.sh +++ b/gopenpgp_build.sh @@ -11,12 +11,14 @@ OUTPUT_PATH="$GOPATH/dist" mkdir -p "$GOPATH" -go get -u golang.org/x/mobile/cmd/gomobile || true -gomobile init +go get golang.org/x/mobile/cmd/gomobile || true +( cd "$GOPATH/src/golang.org/x/mobile/cmd/gomobile" && git checkout 0df4eb2385467a487d418c6358313e9e838256ae ) +GO111MODULE=on go get golang.org/x/mobile/cmd/gomobile@0df4eb2385467a487d418c6358313e9e838256ae || true +GO111MODULE=on go get golang.org/x/mobile/cmd/gobind@0df4eb2385467a487d418c6358313e9e838256ae || true go get -u "$PACKAGE_PATH" || true mkdir -p "$GOPATH/src/github.com/ProtonMail" -ln -s "$GOPATH/src/$PACKAGE_PATH" "$GOPATH/src/github.com/ProtonMail/gopenpgp" +ln -f -s "$GOPATH/src/$PACKAGE_PATH" "$GOPATH/src/github.com/ProtonMail/gopenpgp" ( cd "$GOPATH/src/$PACKAGE_PATH" && git checkout "$GOPENPGP_REVISION" && GO111MODULE=on go mod vendor )