From 8f3d0126079df03ca346a15b69d9293210deb961 Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Mon, 15 Nov 2021 11:02:55 +0800 Subject: [PATCH] fastlane init --- Gemfile | 6 + Gemfile.lock | 250 ++++++++++++++++++++++++++++++ archive/Debug/fir-xplan-ios.png | Bin 0 -> 1014 bytes fastlane/Appfile | 6 + fastlane/Fastfile | 264 ++++++++++++++++++++++++++++++++ fastlane/Pluginfile | 6 + fastlane/README.md | 74 +++++++++ 7 files changed, 606 insertions(+) create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 archive/Debug/fir-xplan-ios.png create mode 100644 fastlane/Appfile create mode 100644 fastlane/Fastfile create mode 100644 fastlane/Pluginfile create mode 100644 fastlane/README.md diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..4eb28bcb --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source "https://gems.ruby-china.com" + +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 00000000..d6644dd9 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,250 @@ +GEM + remote: https://gems.ruby-china.com/ + specs: + CFPropertyList (3.0.4) + rexml + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + admqr_knife (0.1.5) + api_tools + thor + api_tools (0.1.1) + multi_json + rest-client (~> 2.0) + artifactory (3.0.15) + atomos (0.1.3) + aws-eventstream (1.2.0) + aws-partitions (1.529.0) + aws-sdk-core (3.122.1) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.525.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.51.0) + aws-sdk-core (~> 3, >= 3.122.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.105.1) + aws-sdk-core (~> 3, >= 3.122.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.4) + aws-sigv4 (1.4.0) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + chunky_png (1.4.0) + claide (1.0.3) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + declarative (0.0.20) + digest-crc (0.6.4) + 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.2.3) + excon (0.88.0) + faraday (1.8.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + multipart-post (>= 1.2, < 3) + ruby2_keywords (>= 0.0.4) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday_middleware (1.2.0) + faraday (~> 1.0) + fastimage (2.2.5) + fastlane (2.197.0) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored + commander (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (~> 2.0.0) + naturally (~> 2.2) + optparse (~> 0.1.1) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.3) + simctl (~> 1.6.3) + terminal-notifier (>= 2.0.0, < 3.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.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-fir_cli (2.0.12) + fir-cli (~> 2.0.12) + fastlane-plugin-pgyer (0.2.2) + fir-cli (2.0.14) + CFPropertyList + admqr_knife (~> 0.1.5) + api_tools (~> 0.1.1) + rest-client (~> 2.0) + rexml + rqrcode (~> 0.7) + ruby_android_apk (~> 0.7.7.1) + thor (~> 0.19) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.13.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-core (0.4.1) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-iamcredentials_v1 (0.8.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-playcustomapp_v1 (0.6.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-storage_v1 (0.9.0) + google-apis-core (>= 0.4, < 2.a) + google-cloud-core (1.6.0) + google-cloud-env (~> 1.0) + google-cloud-errors (~> 1.0) + google-cloud-env (1.5.0) + faraday (>= 0.17.3, < 2.0) + google-cloud-errors (1.2.0) + google-cloud-storage (1.34.1) + addressable (~> 2.5) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.1) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.1.0) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-accept (1.7.0) + http-cookie (1.0.4) + domain_name (~> 0.5) + httpclient (2.8.3) + jmespath (1.4.0) + json (2.6.1) + jwt (2.3.0) + memoist (0.16.2) + mime-types (3.3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2021.0901) + mini_magick (4.11.0) + mini_mime (1.1.2) + multi_json (1.15.0) + multipart-post (2.0.0) + nanaimo (0.3.0) + naturally (2.2.1) + netrc (0.11.0) + optparse (0.1.1) + os (1.1.4) + plist (3.6.0) + public_suffix (4.0.6) + rake (13.0.6) + representable (3.1.1) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + rest-client (2.1.0) + http-accept (>= 1.7.0, < 2.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) + retriable (3.1.2) + rexml (3.2.5) + rouge (2.0.7) + rqrcode (0.10.1) + chunky_png (~> 1.0) + ruby2_keywords (0.0.5) + ruby_android_apk (0.7.7.1) + rubyzip (>= 1.1.6) + rubyzip (2.3.2) + security (0.1.3) + signet (0.16.0) + addressable (~> 2.8) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.8) + CFPropertyList + naturally + terminal-notifier (2.0.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thor (0.20.3) + trailblazer-option (0.1.2) + tty-cursor (0.7.1) + tty-screen (0.8.1) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8) + unicode-display_width (1.8.0) + webrick (1.7.0) + word_wrap (1.0.0) + xcodeproj (1.21.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + rexml (~> 3.2.4) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + arm64-darwin-20 + +DEPENDENCIES + fastlane + fastlane-plugin-fir_cli + fastlane-plugin-pgyer + +BUNDLED WITH + 2.2.3 diff --git a/archive/Debug/fir-xplan-ios.png b/archive/Debug/fir-xplan-ios.png new file mode 100644 index 0000000000000000000000000000000000000000..013a63c996564026787fe5f6100de85cf7669e23 GIT binary patch literal 1014 zcmV00Hy?00000 zL2lzP3`NDbfM=K7z`2QYGutu^56VXP^e3tA z_)Fuu3tt=H!Gi}69z1yP|HWS@kC!+JGtn+gGSM-niQUO#z4gI^-!|{@d>=x?p=Q2O zBa=90>TYxh-J9GAp-oS|uDU*W@SEmUSPpWfVss+D5X+ZwGo6XAA>8PwPqN9>%Ikv% z|1)^ipR-&IQHMlw;+8pl-}>OeZ<&v}Gto(|I@O=}r;^C7;*q{%eemG7$Jd(8kgK9U ze#a;J{u4-^d|P{c@ZdMhyQkI%bJLM)k zD~weXBemRQQWmKfx%c(f2M_)y@S5d`o9VZ?Y`uQ@F0xZ)Dq{3xzaKpK$M6!7?ZTdU zrlZW;yM2El*-WytdhxGm&w~;-YN0>i!7FcC!d`!1@f)*>k=<#E|E8HC_y^#@7e4Nm za}fRUDg!M!NdEOn^d~A)%kFFs$e)4-@4Tsu4BZ$pWK;iOcrpLLMwLo-*ot}9Tpv96 zE%O?`=_`+JjQEzrqCY`GHdCfx^*f8rG{Qds58m}hs|>D5eTgEgj2iExHaqAKc<|1zVK2bddn_b^54`;2+1&mNM0iVZq##n(2a=3EsbuMhx>%e*hl*C+|O_`UkoG%}?g(G_y*n zm=yjsc<|0!|LNUQrs@*3ss2q%cC<3ioNawf2lA)j!MlIGIDgb6XJ=JzZe~xGKefy% z>fgYFf5$J*AGInSmSO}pGh6FNdws5)4EMU~`ryHDnlI;%s%0IAejd~9DHW4yn>YM7 z@ZkT+x17)4*(b@7&E) 为当天版本 计算迭代版本号 + lastStr = build[build.length-2..build.length-1] + lastNum = lastStr.to_i + lastNum = lastNum + 1 + lastStr = lastNum.to_s + + if lastNum < 10 + lastStr = lastStr.insert(0,"0") + end + # 如果是当天的版本 格式为:2019122703 当天的年月日加上构建的次数 日期+build + build = "#{currentTime}#{lastStr}" + else + # => 非当天版本 build 号重置 + build = "#{currentTime}01" + end + UI.message("*************| " + magenta("更新 Build #{build}") + " |*************") + # => 更改项目 build 号 + increment_build_number( + build_number: "#{build}" + ) + + end + + desc "8. 上传符号表操作" + lane :upload_dSYM do + #上传符号表到 bugly + + bugly(app_id: "f80a6c7ccc", + app_key: "b3549e1a-11ae-40ed-8568-29b5b72c61a2", + symbol_type: 2, + bundle_id: "com.laihui.lookinglove", + product_version: "1.3.1", + channel: CONFIGURATION + ) + + end + + lane :resigh do + resign( + ipa: "/Users/gzlx/Desktop/HAYO 2020-04-09 16-56-30/HAYO.ipa", # can omit if using the `ipa` action + signing_identity: "Apple Development: yikai xu (67DUV395JB)", + provisioning_profile: "/Users/gzlx/Desktop/HYAO证书/adhoc-3.mobileprovision", # can omit if using the _sigh_ action + ) + end + + lane :review do + deliver( + ipa: "#{OUTPUT_DIRECTORY}/#{IPA_NAME}", + force: true, # Skip HTMl report verification + skip_metadata: true, + skip_screenshots: true + ) + end + + + # You can define as many lanes as you want + + after_all do |lane| + # This block is called, only if the executed lane was successful + + slack( + slack_url: "https://hooks.slack.com/services/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", + message: "Successfully deployed new App Update.", + payload: {"text": "{A very important thing has occurred! for details!"} + ) + end + + error do |lane, exception| + slack( + slack_url: "https://hooks.slack.com/services/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", + message: "打包失败了, 请查看原因", + success: false + ) + end +end + + +# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md +# All available actions: https://docs.fastlane.tools/actions + +# fastlane reports which actions are used +# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile new file mode 100644 index 00000000..bba2f22f --- /dev/null +++ b/fastlane/Pluginfile @@ -0,0 +1,6 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-pgyer' +gem 'fastlane-plugin-fir_cli' diff --git a/fastlane/README.md b/fastlane/README.md new file mode 100644 index 00000000..6937a7c5 --- /dev/null +++ b/fastlane/README.md @@ -0,0 +1,74 @@ +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 install fastlane` + +# Available Actions +## iOS +### ios d +``` +fastlane ios d +``` +1. 发布iOS Dubug ipa 到 firim 网站 +### ios r +``` +fastlane ios r +``` +2. 发布iOS Release ipa 到 firim 网站 +### ios store +``` +fastlane ios store +``` +3. 发布iOS Release ipa 到 苹果商店 +### ios archiveAction +``` +fastlane ios archiveAction +``` +4. 打包操作 +### ios uploadToFirim +``` +fastlane ios uploadToFirim +``` +5. 执行上传操作 +### ios uploadAppleStore +``` +fastlane ios uploadAppleStore +``` +6. 发布到 Apple Store +### ios updateProjectBuildNumber +``` +fastlane ios updateProjectBuildNumber +``` +7. 用于更新 App 的 build Num 的方法 +### ios upload_dSYM +``` +fastlane ios upload_dSYM +``` +8. 上传符号表操作 +### ios resigh +``` +fastlane ios resigh +``` + +### ios review +``` +fastlane ios review +``` + + +---- + +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).