fastlane-plugin-hexsign 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72686217f19a9f6e83bb472c6ad489655661687e7c988593d933b170f41c1af6
|
|
4
|
+
data.tar.gz: 40f5283b313b32c6c1fba21fcef215182cfe090bb2819a0f22c4cbef9b9b6287
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cea81d52799181396a155e49052cd5c607fa4f74c451a1bbadbaa69fc661ac71f482223fb337698a9f4401e7ce295947edce9f4e162f446c71c50f2a8a54aac8
|
|
7
|
+
data.tar.gz: 2974f398c7d5c4fe72d8509ff3557c49c6abc1ce486de0ad1725db4bb2adf30f2a41b8d57752934fe9c456b2853477304a2806702d27e9e2037c0264fe877e0b
|
data/README.md
CHANGED
|
@@ -81,6 +81,50 @@ hexsign_profiles_download(
|
|
|
81
81
|
| `output_dir` | `HEXSIGN_PROFILE_OUTPUT_DIR` | no | Output directory |
|
|
82
82
|
| `filename` | `HEXSIGN_PROFILE_FILENAME` | no | Filename (no extension) |
|
|
83
83
|
|
|
84
|
+
### `hexsign_certificates_download_by_type`
|
|
85
|
+
|
|
86
|
+
Downloads **every** signing certificate of a given type for one Apple Developer
|
|
87
|
+
team. Survives certificate rotation: no UUID to update when a cert is renewed.
|
|
88
|
+
|
|
89
|
+
Returns an array of `{ p12:, password: }` hashes — one per downloaded certificate.
|
|
90
|
+
|
|
91
|
+
```ruby
|
|
92
|
+
pairs = hexsign_certificates_download_by_type(
|
|
93
|
+
type: "IOS_DISTRIBUTION",
|
|
94
|
+
team_id: "ABCDE12345",
|
|
95
|
+
output_dir: "build/sign"
|
|
96
|
+
)
|
|
97
|
+
# => [{ p12: "build/sign/foo.p12", password: "build/sign/foo.password" }, ...]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
| Option | Env | Required | Description |
|
|
101
|
+
|---|---|---|---|
|
|
102
|
+
| `type` | `HEXSIGN_CERTIFICATE_TYPE` | yes | Apple cert type (e.g. `IOS_DISTRIBUTION`) |
|
|
103
|
+
| `team_id` | `HEXSIGN_TEAM_ID` | yes | Apple Developer team id |
|
|
104
|
+
| `output_dir` | `HEXSIGN_CERTIFICATE_OUTPUT_DIR` | no | Output directory |
|
|
105
|
+
|
|
106
|
+
### `hexsign_profiles_download_by_bundle_id`
|
|
107
|
+
|
|
108
|
+
Downloads **every** provisioning profile for a bundle identifier. Survives
|
|
109
|
+
profile rotation: no UUID to update when a profile is regenerated.
|
|
110
|
+
|
|
111
|
+
Returns an array of absolute paths to the downloaded `.mobileprovision` files.
|
|
112
|
+
|
|
113
|
+
```ruby
|
|
114
|
+
paths = hexsign_profiles_download_by_bundle_id(
|
|
115
|
+
bundle_id: "com.example.app",
|
|
116
|
+
team_id: "ABCDE12345", # optional — scopes across linked Apple accounts
|
|
117
|
+
output_dir: "build/sign"
|
|
118
|
+
)
|
|
119
|
+
# => ["build/sign/foo.mobileprovision", "build/sign/bar.mobileprovision"]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
| Option | Env | Required | Description |
|
|
123
|
+
|---|---|---|---|
|
|
124
|
+
| `bundle_id` | `HEXSIGN_BUNDLE_ID` | yes | App bundle identifier (exact match) |
|
|
125
|
+
| `team_id` | `HEXSIGN_TEAM_ID` | no | Apple Developer team id — scopes across linked accounts |
|
|
126
|
+
| `output_dir` | `HEXSIGN_PROFILE_OUTPUT_DIR` | no | Output directory |
|
|
127
|
+
|
|
84
128
|
## Example lane
|
|
85
129
|
|
|
86
130
|
```ruby
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "fastlane/action"
|
|
4
|
+
require_relative "../helper/hexsign_helper"
|
|
5
|
+
|
|
6
|
+
module Fastlane
|
|
7
|
+
module Actions
|
|
8
|
+
class HexsignCertificatesDownloadByTypeAction < Action
|
|
9
|
+
def self.run(params)
|
|
10
|
+
args = [
|
|
11
|
+
"certificates", "download",
|
|
12
|
+
"--type", params[:type],
|
|
13
|
+
"--team-id", params[:team_id]
|
|
14
|
+
]
|
|
15
|
+
args.push("--output-dir", params[:output_dir]) if params[:output_dir]
|
|
16
|
+
|
|
17
|
+
stdout = Helper::HexsignHelper.run(args)
|
|
18
|
+
pairs = parse_stdout(stdout)
|
|
19
|
+
|
|
20
|
+
UI.success("Downloaded #{pairs.size} #{params[:type]} certificate(s) for team #{params[:team_id]}")
|
|
21
|
+
pairs
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# The CLI prints two lines per certificate: .p12 path then .password path.
|
|
25
|
+
# Returns [{ p12: "...", password: "..." }, ...].
|
|
26
|
+
def self.parse_stdout(stdout)
|
|
27
|
+
lines = stdout.split("\n").map(&:strip).reject(&:empty?)
|
|
28
|
+
pairs = []
|
|
29
|
+
lines.each_slice(2) do |p12, password|
|
|
30
|
+
pairs << { p12: p12, password: password }
|
|
31
|
+
end
|
|
32
|
+
pairs
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.description
|
|
36
|
+
"Download every signing certificate of a given type for one Apple Developer team via the HexSign CLI."
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.authors
|
|
40
|
+
["HexSign"]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def self.details
|
|
44
|
+
<<~DETAILS
|
|
45
|
+
Wraps `hexsign certificates download --type <T> --team-id <ID>`. Returns an
|
|
46
|
+
array of { p12:, password: } hashes — one per downloaded certificate.
|
|
47
|
+
|
|
48
|
+
Survives certificate rotation: you point at a cert type (e.g. IOS_DISTRIBUTION)
|
|
49
|
+
rather than a specific UUID that changes when a cert is renewed.
|
|
50
|
+
|
|
51
|
+
The hexsign binary must be on PATH — install via `brew install hexsign` or the
|
|
52
|
+
hexsign/hexsign-cli GitHub Action. Set HEXSIGN_CLIENT_ID and HEXSIGN_CLIENT_SECRET
|
|
53
|
+
so the CLI runs in machine mode.
|
|
54
|
+
|
|
55
|
+
Accepted types: IOS_DEVELOPMENT, IOS_DISTRIBUTION, MAC_APP_DEVELOPMENT,
|
|
56
|
+
MAC_APP_DISTRIBUTION, MAC_INSTALLER_DISTRIBUTION, DEVELOPER_ID_APPLICATION,
|
|
57
|
+
DEVELOPER_ID_APPLICATION_G2, DEVELOPER_ID_KEXT, DEVELOPER_ID_KEXT_G2,
|
|
58
|
+
DEVELOPER_ID_INSTALLER, DEVELOPMENT, DISTRIBUTION, PASS_TYPE_ID,
|
|
59
|
+
PASS_TYPE_ID_WITH_NFC.
|
|
60
|
+
DETAILS
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def self.available_options
|
|
64
|
+
[
|
|
65
|
+
FastlaneCore::ConfigItem.new(
|
|
66
|
+
key: :type,
|
|
67
|
+
env_name: "HEXSIGN_CERTIFICATE_TYPE",
|
|
68
|
+
description: "Apple certificate type, e.g. IOS_DISTRIBUTION",
|
|
69
|
+
optional: false,
|
|
70
|
+
type: String
|
|
71
|
+
),
|
|
72
|
+
FastlaneCore::ConfigItem.new(
|
|
73
|
+
key: :team_id,
|
|
74
|
+
env_name: "HEXSIGN_TEAM_ID",
|
|
75
|
+
description: "Apple Developer team identifier to scope the download to",
|
|
76
|
+
optional: false,
|
|
77
|
+
type: String
|
|
78
|
+
),
|
|
79
|
+
FastlaneCore::ConfigItem.new(
|
|
80
|
+
key: :output_dir,
|
|
81
|
+
env_name: "HEXSIGN_CERTIFICATE_OUTPUT_DIR",
|
|
82
|
+
description: "Directory to write the .p12 and .password files into",
|
|
83
|
+
optional: true,
|
|
84
|
+
type: String
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def self.output
|
|
90
|
+
[
|
|
91
|
+
["HEXSIGN_CERTIFICATES_DOWNLOAD_BY_TYPE_COUNT", "Number of certificates downloaded"]
|
|
92
|
+
]
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def self.return_value
|
|
96
|
+
"Array of { p12:, password: } hashes — one per downloaded certificate."
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def self.is_supported?(platform)
|
|
100
|
+
%i[ios mac tvos watchos visionos].include?(platform)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def self.example_code
|
|
104
|
+
[
|
|
105
|
+
'pairs = hexsign_certificates_download_by_type(
|
|
106
|
+
type: "IOS_DISTRIBUTION",
|
|
107
|
+
team_id: "ABCDE12345",
|
|
108
|
+
output_dir: "build/sign"
|
|
109
|
+
)
|
|
110
|
+
# => [{ p12: "build/sign/foo.p12", password: "build/sign/foo.password" }, ...]'
|
|
111
|
+
]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def self.category
|
|
115
|
+
:code_signing
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "fastlane/action"
|
|
4
|
+
require_relative "../helper/hexsign_helper"
|
|
5
|
+
|
|
6
|
+
module Fastlane
|
|
7
|
+
module Actions
|
|
8
|
+
class HexsignProfilesDownloadByBundleIdAction < Action
|
|
9
|
+
def self.run(params)
|
|
10
|
+
args = ["profiles", "download", "--bundle-id", params[:bundle_id]]
|
|
11
|
+
args.push("--team-id", params[:team_id]) if params[:team_id]
|
|
12
|
+
args.push("--output-dir", params[:output_dir]) if params[:output_dir]
|
|
13
|
+
|
|
14
|
+
stdout = Helper::HexsignHelper.run(args)
|
|
15
|
+
paths = stdout.split("\n").map(&:strip).reject(&:empty?)
|
|
16
|
+
|
|
17
|
+
UI.success("Downloaded #{paths.size} provisioning profile(s) for bundle #{params[:bundle_id]}")
|
|
18
|
+
paths
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.description
|
|
22
|
+
"Download every provisioning profile for a given bundle identifier via the HexSign CLI."
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.authors
|
|
26
|
+
["HexSign"]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.details
|
|
30
|
+
<<~DETAILS
|
|
31
|
+
Wraps `hexsign profiles download --bundle-id <ID> [--team-id <TID>]`. Returns an
|
|
32
|
+
array of absolute paths to the downloaded `.mobileprovision` files.
|
|
33
|
+
|
|
34
|
+
Survives profile rotation: you point at a bundle identifier rather than the
|
|
35
|
+
UUID of a specific provisioning profile.
|
|
36
|
+
|
|
37
|
+
Pass `team_id` when the same bundle id exists in more than one linked Apple
|
|
38
|
+
account to avoid pulling profiles from the wrong team.
|
|
39
|
+
|
|
40
|
+
The hexsign binary must be on PATH — install via `brew install hexsign` or the
|
|
41
|
+
hexsign/hexsign-cli GitHub Action. Set HEXSIGN_CLIENT_ID and HEXSIGN_CLIENT_SECRET
|
|
42
|
+
so the CLI runs in machine mode.
|
|
43
|
+
DETAILS
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def self.available_options
|
|
47
|
+
[
|
|
48
|
+
FastlaneCore::ConfigItem.new(
|
|
49
|
+
key: :bundle_id,
|
|
50
|
+
env_name: "HEXSIGN_BUNDLE_ID",
|
|
51
|
+
description: "App bundle identifier (exact match)",
|
|
52
|
+
optional: false,
|
|
53
|
+
type: String
|
|
54
|
+
),
|
|
55
|
+
FastlaneCore::ConfigItem.new(
|
|
56
|
+
key: :team_id,
|
|
57
|
+
env_name: "HEXSIGN_TEAM_ID",
|
|
58
|
+
description: "Apple Developer team identifier — scopes the download across linked accounts",
|
|
59
|
+
optional: true,
|
|
60
|
+
type: String
|
|
61
|
+
),
|
|
62
|
+
FastlaneCore::ConfigItem.new(
|
|
63
|
+
key: :output_dir,
|
|
64
|
+
env_name: "HEXSIGN_PROFILE_OUTPUT_DIR",
|
|
65
|
+
description: "Directory to write the .mobileprovision files into",
|
|
66
|
+
optional: true,
|
|
67
|
+
type: String
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def self.return_value
|
|
73
|
+
"Array of absolute paths to the downloaded .mobileprovision files."
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def self.is_supported?(platform)
|
|
77
|
+
%i[ios mac tvos watchos visionos].include?(platform)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def self.example_code
|
|
81
|
+
[
|
|
82
|
+
'paths = hexsign_profiles_download_by_bundle_id(
|
|
83
|
+
bundle_id: "com.example.app",
|
|
84
|
+
team_id: "ABCDE12345",
|
|
85
|
+
output_dir: "build/sign"
|
|
86
|
+
)
|
|
87
|
+
# => ["build/sign/foo.mobileprovision", "build/sign/bar.mobileprovision"]'
|
|
88
|
+
]
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def self.category
|
|
92
|
+
:code_signing
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-hexsign
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- HexSign
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fastlane
|
|
@@ -76,7 +76,9 @@ files:
|
|
|
76
76
|
- README.md
|
|
77
77
|
- lib/fastlane/plugin/hexsign.rb
|
|
78
78
|
- lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download.rb
|
|
79
|
+
- lib/fastlane/plugin/hexsign/actions/hexsign_certificates_download_by_type.rb
|
|
79
80
|
- lib/fastlane/plugin/hexsign/actions/hexsign_profiles_download.rb
|
|
81
|
+
- lib/fastlane/plugin/hexsign/actions/hexsign_profiles_download_by_bundle_id.rb
|
|
80
82
|
- lib/fastlane/plugin/hexsign/helper/hexsign_helper.rb
|
|
81
83
|
- lib/fastlane/plugin/hexsign/version.rb
|
|
82
84
|
homepage: https://github.com/hexsign/fastlane-plugin-hexsign
|