Class: Fastlane::Actions::HexsignCertificatesDownloadAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::HexsignCertificatesDownloadAction
- Defined in:
- lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .category ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .example_code ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
21 22 23 |
# File 'lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb', line 21 def self. ["HexSign"] end |
.available_options ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb', line 35 def self. [ FastlaneCore::ConfigItem.new( key: :id, env_name: "HEXSIGN_CERTIFICATE_ID", description: "Certificate ID to download", optional: false, type: String ), FastlaneCore::ConfigItem.new( key: :output_dir, env_name: "HEXSIGN_CERTIFICATE_OUTPUT_DIR", description: "Directory to write the .p12 and .password files into", optional: true, type: String ), FastlaneCore::ConfigItem.new( key: :filename, env_name: "HEXSIGN_CERTIFICATE_FILENAME", description: "Base filename (no extension) for the downloaded files", optional: true, type: String ) ] end |
.category ⇒ Object
71 72 73 |
# File 'lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb', line 71 def self.category :code_signing end |
.description ⇒ Object
17 18 19 |
# File 'lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb', line 17 def self.description "Download an Apple signing certificate (.p12 + .password) via the HexSign CLI." end |
.details ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb', line 25 def self.details <<~DETAILS Wraps `hexsign certificates download <id>`. The hexsign binary must be on PATH — install it with `brew install hexsign` or via the hexsign/hexsign-cli GitHub Action. Set HEXSIGN_CLIENT_ID and HEXSIGN_CLIENT_SECRET in the environment so the CLI runs in machine mode. See https://github.com/hexsign/hexsign-cli for token provisioning. DETAILS end |
.example_code ⇒ Object
65 66 67 68 69 |
# File 'lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb', line 65 def self.example_code [ 'hexsign_certificates_download(id: "cert-abc123", output_dir: "build/sign")' ] end |
.is_supported?(platform) ⇒ Boolean
61 62 63 |
# File 'lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb', line 61 def self.is_supported?(platform) %i[ios mac tvos watchos visionos].include?(platform) end |
.run(params) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb', line 9 def self.run(params) args = ["certificates", "download", params[:id]] args.push("--output-dir", params[:output_dir]) if params[:output_dir] args.push("--filename", params[:filename]) if params[:filename] Helper::HexsignHelper.run(args).tap { UI.success("Downloaded certificate #{params[:id]}") } end |