rake_ssh 0.13.0.pre.2 → 0.13.0.pre.2.pr157.1.1
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 +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +84 -70
- data/README.md +4 -4
- data/Rakefile +111 -45
- data/lib/rake_ssh/version.rb +1 -1
- data/rake_ssh.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c5d100e12d3ef02fd7bc1523ee378058af58660e8616a4fa2eb8e9f05e2dbad
|
|
4
|
+
data.tar.gz: e490459095ef9feea56f773d7e7876527dd74c1554a65473235b087c6f380350
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18ca28e93d0964ca455db8ae12b66a44ec09168930685f3eb32349004bd5f96ba2366974e82df59e5fdcefcc757df28520691450844588cda49c63ceb026a6b6
|
|
7
|
+
data.tar.gz: f2622b737be6d26fdc91640e34d769a1d27450a2744c20efeb87ebb5471ab9de7844fce35f07cd06d3e1ce3762d3743c48119799b38dbd8bf32a27af0e490ba7
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rake_ssh (0.13.0.pre.2)
|
|
4
|
+
rake_ssh (0.13.0.pre.2.pr157.1.1)
|
|
5
5
|
colored2 (~> 3.1)
|
|
6
6
|
rake_factory (~> 0.33)
|
|
7
7
|
sshkey (~> 2.0)
|
|
@@ -9,73 +9,77 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (
|
|
12
|
+
activesupport (8.1.3)
|
|
13
13
|
base64
|
|
14
14
|
bigdecimal
|
|
15
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
16
16
|
connection_pool (>= 2.2.5)
|
|
17
17
|
drb
|
|
18
18
|
i18n (>= 1.6, < 2)
|
|
19
|
+
json
|
|
20
|
+
logger (>= 1.4.2)
|
|
19
21
|
minitest (>= 5.1)
|
|
20
|
-
|
|
21
|
-
tzinfo (~> 2.0)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
securerandom (>= 0.3)
|
|
23
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
24
|
+
uri (>= 0.13.1)
|
|
25
|
+
addressable (2.9.0)
|
|
26
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
27
|
+
ast (2.4.3)
|
|
28
|
+
base64 (0.3.0)
|
|
29
|
+
bigdecimal (4.1.2)
|
|
27
30
|
childprocess (5.0.0)
|
|
28
31
|
colored2 (3.1.2)
|
|
29
|
-
concurrent-ruby (1.3.
|
|
30
|
-
connection_pool (
|
|
31
|
-
diff-lcs (1.
|
|
32
|
+
concurrent-ruby (1.3.8)
|
|
33
|
+
connection_pool (3.0.2)
|
|
34
|
+
diff-lcs (1.6.2)
|
|
32
35
|
docile (1.4.0)
|
|
33
|
-
drb (2.2.
|
|
34
|
-
excon (
|
|
35
|
-
faraday (2.10.0)
|
|
36
|
-
faraday-net_http (>= 2.0, < 3.2)
|
|
36
|
+
drb (2.2.3)
|
|
37
|
+
excon (1.6.0)
|
|
37
38
|
logger
|
|
38
|
-
faraday
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
faraday (2.14.3)
|
|
40
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
41
|
+
json
|
|
42
|
+
logger
|
|
43
|
+
faraday-net_http (3.4.4)
|
|
44
|
+
net-http (~> 0.5)
|
|
45
|
+
ffi (1.17.4)
|
|
46
|
+
ffi (1.17.4-arm64-darwin)
|
|
47
|
+
ffi (1.17.4-x86_64-darwin)
|
|
48
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
49
|
+
gem-release (2.2.4)
|
|
41
50
|
git (1.19.1)
|
|
42
51
|
addressable (~> 2.8)
|
|
43
52
|
rchardet (~> 1.8)
|
|
44
53
|
hamster (3.0.0)
|
|
45
54
|
concurrent-ruby (~> 1.0)
|
|
46
|
-
i18n (1.
|
|
55
|
+
i18n (1.15.2)
|
|
47
56
|
concurrent-ruby (~> 1.0)
|
|
48
|
-
immutable-struct (2.
|
|
49
|
-
json (2.
|
|
50
|
-
language_server-protocol (3.17.0.
|
|
57
|
+
immutable-struct (2.5.0)
|
|
58
|
+
json (2.12.2)
|
|
59
|
+
language_server-protocol (3.17.0.5)
|
|
51
60
|
lino (4.1.0)
|
|
52
61
|
childprocess (~> 5.0.0)
|
|
53
62
|
hamster (~> 3.0)
|
|
54
63
|
open4 (~> 1.3)
|
|
55
|
-
|
|
64
|
+
lint_roller (1.1.0)
|
|
65
|
+
logger (1.7.0)
|
|
56
66
|
memfs (1.0.0)
|
|
57
|
-
minitest (5.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
octokit (8.1.0)
|
|
62
|
-
base64
|
|
67
|
+
minitest (5.27.0)
|
|
68
|
+
net-http (0.9.1)
|
|
69
|
+
uri (>= 0.11.1)
|
|
70
|
+
octokit (10.0.0)
|
|
63
71
|
faraday (>= 1, < 3)
|
|
64
72
|
sawyer (~> 0.9)
|
|
65
73
|
open4 (1.3.4)
|
|
66
|
-
parallel (1.
|
|
67
|
-
parser (3.3.
|
|
74
|
+
parallel (1.27.0)
|
|
75
|
+
parser (3.3.8.0)
|
|
68
76
|
ast (~> 2.4.1)
|
|
69
77
|
racc
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
prism (1.4.0)
|
|
79
|
+
public_suffix (7.0.5)
|
|
80
|
+
racc (1.8.1)
|
|
72
81
|
rainbow (3.1.1)
|
|
73
|
-
rake (13.2
|
|
74
|
-
rake_circle_ci (0.13.0)
|
|
75
|
-
colored2 (~> 3.1)
|
|
76
|
-
excon (~> 0.72)
|
|
77
|
-
rake_factory (~> 0.33)
|
|
78
|
-
sshkey (~> 2.0)
|
|
82
|
+
rake (13.4.2)
|
|
79
83
|
rake_factory (0.33.0)
|
|
80
84
|
activesupport (>= 4)
|
|
81
85
|
rake (~> 13.0)
|
|
@@ -83,62 +87,71 @@ GEM
|
|
|
83
87
|
colored2 (~> 3.1)
|
|
84
88
|
git (~> 1.13, >= 1.13.2)
|
|
85
89
|
rake_factory (~> 0.33)
|
|
86
|
-
rake_git_crypt (0.
|
|
90
|
+
rake_git_crypt (0.4.0)
|
|
87
91
|
colored2 (~> 3.1)
|
|
92
|
+
lino (~> 4.1)
|
|
88
93
|
rake_factory (~> 0.33)
|
|
89
94
|
ruby_git_crypt (~> 0.1)
|
|
90
95
|
ruby_gpg2 (~> 0.12)
|
|
91
|
-
rake_github (0.
|
|
96
|
+
rake_github (0.17.0)
|
|
92
97
|
colored2 (~> 3.1)
|
|
93
|
-
octokit (>=
|
|
94
|
-
rake_factory (~> 0.
|
|
98
|
+
octokit (>= 7.0, < 11.0)
|
|
99
|
+
rake_factory (~> 0.33)
|
|
100
|
+
rbnacl (~> 7.1)
|
|
95
101
|
sshkey (~> 2.0)
|
|
96
102
|
rake_gpg (0.20.0)
|
|
97
103
|
rake_factory (~> 0.33)
|
|
98
104
|
ruby_gpg2 (~> 0.12)
|
|
105
|
+
rake_slack (0.3.0)
|
|
106
|
+
excon (>= 0.72, < 2.0)
|
|
107
|
+
rake_factory (~> 0.33)
|
|
108
|
+
rbnacl (7.1.2)
|
|
109
|
+
ffi (~> 1)
|
|
99
110
|
rchardet (1.8.0)
|
|
100
|
-
regexp_parser (2.
|
|
101
|
-
|
|
102
|
-
strscan
|
|
103
|
-
rspec (3.13.0)
|
|
111
|
+
regexp_parser (2.10.0)
|
|
112
|
+
rspec (3.13.1)
|
|
104
113
|
rspec-core (~> 3.13.0)
|
|
105
114
|
rspec-expectations (~> 3.13.0)
|
|
106
115
|
rspec-mocks (~> 3.13.0)
|
|
107
|
-
rspec-core (3.13.
|
|
116
|
+
rspec-core (3.13.4)
|
|
108
117
|
rspec-support (~> 3.13.0)
|
|
109
|
-
rspec-expectations (3.13.
|
|
118
|
+
rspec-expectations (3.13.5)
|
|
110
119
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
111
120
|
rspec-support (~> 3.13.0)
|
|
112
|
-
rspec-mocks (3.13.
|
|
121
|
+
rspec-mocks (3.13.5)
|
|
113
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
114
123
|
rspec-support (~> 3.13.0)
|
|
115
|
-
rspec-support (3.13.
|
|
116
|
-
rubocop (1.
|
|
124
|
+
rspec-support (3.13.4)
|
|
125
|
+
rubocop (1.76.0)
|
|
117
126
|
json (~> 2.3)
|
|
118
|
-
language_server-protocol (
|
|
127
|
+
language_server-protocol (~> 3.17.0.2)
|
|
128
|
+
lint_roller (~> 1.1.0)
|
|
119
129
|
parallel (~> 1.10)
|
|
120
130
|
parser (>= 3.3.0.2)
|
|
121
131
|
rainbow (>= 2.2.2, < 4.0)
|
|
122
|
-
regexp_parser (>= 2.
|
|
123
|
-
|
|
124
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
132
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
133
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
|
125
134
|
ruby-progressbar (~> 1.7)
|
|
126
|
-
unicode-display_width (>= 2.4.0, <
|
|
127
|
-
rubocop-ast (1.
|
|
128
|
-
parser (>= 3.3.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
rubocop (
|
|
135
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
136
|
+
rubocop-ast (1.45.0)
|
|
137
|
+
parser (>= 3.3.7.2)
|
|
138
|
+
prism (~> 1.4)
|
|
139
|
+
rubocop-rake (0.7.1)
|
|
140
|
+
lint_roller (~> 1.1)
|
|
141
|
+
rubocop (>= 1.72.1)
|
|
142
|
+
rubocop-rspec (3.6.0)
|
|
143
|
+
lint_roller (~> 1.1)
|
|
144
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
133
145
|
ruby-progressbar (1.13.0)
|
|
134
146
|
ruby_git_crypt (0.1.0)
|
|
135
147
|
immutable-struct (~> 2.4)
|
|
136
148
|
lino (>= 4.1)
|
|
137
149
|
ruby_gpg2 (0.12.0)
|
|
138
150
|
lino (>= 4.1)
|
|
139
|
-
sawyer (0.9.
|
|
151
|
+
sawyer (0.9.3)
|
|
140
152
|
addressable (>= 2.3.5)
|
|
141
153
|
faraday (>= 0.17.3, < 3)
|
|
154
|
+
securerandom (0.4.1)
|
|
142
155
|
simplecov (0.22.0)
|
|
143
156
|
docile (~> 1.1)
|
|
144
157
|
simplecov-html (~> 0.11)
|
|
@@ -146,11 +159,12 @@ GEM
|
|
|
146
159
|
simplecov-html (0.12.3)
|
|
147
160
|
simplecov_json_formatter (0.1.4)
|
|
148
161
|
sshkey (2.0.0)
|
|
149
|
-
strscan (3.1.0)
|
|
150
162
|
tzinfo (2.0.6)
|
|
151
163
|
concurrent-ruby (~> 1.0)
|
|
152
|
-
unicode-display_width (
|
|
153
|
-
|
|
164
|
+
unicode-display_width (3.1.4)
|
|
165
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
166
|
+
unicode-emoji (4.0.4)
|
|
167
|
+
uri (1.1.1)
|
|
154
168
|
|
|
155
169
|
PLATFORMS
|
|
156
170
|
arm64-darwin-21
|
|
@@ -167,11 +181,11 @@ DEPENDENCIES
|
|
|
167
181
|
gem-release
|
|
168
182
|
memfs
|
|
169
183
|
rake
|
|
170
|
-
rake_circle_ci
|
|
171
184
|
rake_git
|
|
172
185
|
rake_git_crypt
|
|
173
186
|
rake_github
|
|
174
187
|
rake_gpg
|
|
188
|
+
rake_slack
|
|
175
189
|
rake_ssh!
|
|
176
190
|
rspec
|
|
177
191
|
rubocop
|
data/README.md
CHANGED
|
@@ -34,16 +34,16 @@ release a new version, update the version number in `version.rb`, and then run
|
|
|
34
34
|
git commits and tags, and push the `.gem` file to
|
|
35
35
|
[rubygems.org](https://rubygems.org).
|
|
36
36
|
|
|
37
|
-
### Managing
|
|
37
|
+
### Managing CI keys
|
|
38
38
|
|
|
39
|
-
To encrypt a GPG key for use by
|
|
39
|
+
To encrypt a GPG key for use by CI:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
openssl aes-256-cbc \
|
|
43
43
|
-e \
|
|
44
44
|
-md sha1 \
|
|
45
45
|
-in ./config/secrets/ci/gpg.private \
|
|
46
|
-
-out ./.
|
|
46
|
+
-out ./.github/gpg.private.enc \
|
|
47
47
|
-k "<passphrase>"
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ To check decryption is working correctly:
|
|
|
53
53
|
openssl aes-256-cbc \
|
|
54
54
|
-d \
|
|
55
55
|
-md sha1 \
|
|
56
|
-
-in ./.
|
|
56
|
+
-in ./.github/gpg.private.enc \
|
|
57
57
|
-k "<passphrase>"
|
|
58
58
|
```
|
|
59
59
|
|
data/Rakefile
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'rake_circle_ci'
|
|
4
3
|
require 'rake_git'
|
|
5
4
|
require 'rake_git_crypt'
|
|
6
5
|
require 'rake_github'
|
|
7
6
|
require 'rake_gpg'
|
|
8
|
-
require '
|
|
7
|
+
require 'rake_slack'
|
|
9
8
|
require 'rspec/core/rake_task'
|
|
10
9
|
require 'rubocop/rake_task'
|
|
11
10
|
require 'securerandom'
|
|
12
|
-
require 'yaml'
|
|
13
11
|
|
|
14
12
|
task default: %i[
|
|
15
13
|
library:fix
|
|
@@ -59,13 +57,6 @@ namespace :encryption do
|
|
|
59
57
|
end
|
|
60
58
|
|
|
61
59
|
namespace :keys do
|
|
62
|
-
namespace :deploy do
|
|
63
|
-
RakeSSH.define_key_tasks(
|
|
64
|
-
path: 'config/secrets/ci/',
|
|
65
|
-
comment: 'maintainers@infrablocks.io'
|
|
66
|
-
)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
60
|
namespace :gpg do
|
|
70
61
|
RakeGPG.define_generate_key_task(
|
|
71
62
|
output_directory: 'config/secrets/ci',
|
|
@@ -91,7 +82,6 @@ namespace :secrets do
|
|
|
91
82
|
desc 'Generate all generatable secrets.'
|
|
92
83
|
task generate: %w[
|
|
93
84
|
encryption:passphrase:generate
|
|
94
|
-
keys:deploy:generate
|
|
95
85
|
keys:gpg:generate
|
|
96
86
|
]
|
|
97
87
|
|
|
@@ -115,57 +105,101 @@ namespace :library do
|
|
|
115
105
|
|
|
116
106
|
desc 'Attempt to automatically fix issues with the library'
|
|
117
107
|
task fix: [:'rubocop:autocorrect_all']
|
|
108
|
+
|
|
109
|
+
desc 'Build the library'
|
|
110
|
+
task :build do
|
|
111
|
+
sh 'gem build rake_ssh.gemspec'
|
|
112
|
+
end
|
|
118
113
|
end
|
|
119
114
|
|
|
120
115
|
namespace :test do
|
|
121
116
|
RSpec::Core::RakeTask.new(:unit)
|
|
122
117
|
end
|
|
123
118
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
119
|
+
namespace :slack do
|
|
120
|
+
RakeSlack.define_notification_tasks do |t|
|
|
121
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
122
|
+
t.routing_rules = [
|
|
123
|
+
{ when: { type: 'on_hold' },
|
|
124
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
125
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
126
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
127
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
128
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
129
|
+
{ when: { outcome: 'success' },
|
|
130
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
131
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
132
|
+
# out of a popular channel while this pipeline beds in.
|
|
133
|
+
{ when: {},
|
|
134
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
135
|
+
]
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
namespace :repository do
|
|
140
|
+
desc 'Set the git author for CI'
|
|
141
|
+
task :set_ci_author do
|
|
142
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
143
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Operator's ambient auth. Resolve once and fail fast: a missing,
|
|
148
|
+
# unauthenticated, or absent gh yields an empty string, which would
|
|
149
|
+
# otherwise surface later as an opaque Octokit 401. An empty or
|
|
150
|
+
# whitespace-only GITHUB_TOKEN is treated as absent so an authenticated
|
|
151
|
+
# operator falls through to `gh auth token` rather than hitting the raise.
|
|
152
|
+
def resolve_github_token
|
|
153
|
+
token = ENV['GITHUB_TOKEN'].to_s.strip
|
|
154
|
+
if token.empty?
|
|
155
|
+
token = begin
|
|
156
|
+
`gh auth token`
|
|
157
|
+
rescue Errno::ENOENT
|
|
158
|
+
''
|
|
159
|
+
end.strip
|
|
160
|
+
end
|
|
161
|
+
return token unless token.empty?
|
|
162
|
+
|
|
163
|
+
raise 'No GitHub token available: set GITHUB_TOKEN or run `gh auth login`'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Actions store only: dependabot runs never reach the passphrase — the
|
|
167
|
+
# only pr.yaml job that unlocks git-crypt (prerelease) is guarded to
|
|
168
|
+
# same-repo human PRs. Guard against a locked clone: without it, File.read
|
|
169
|
+
# returns git-crypt ciphertext and github:secrets:ensure silently uploads
|
|
170
|
+
# garbage that only surfaces much later as an opaque GPG unlock failure in
|
|
171
|
+
# the release job.
|
|
172
|
+
def read_encryption_passphrase
|
|
173
|
+
path = 'config/secrets/ci/encryption.passphrase'
|
|
174
|
+
raise "Passphrase file not found: #{path} — expected an unlocked clone" \
|
|
175
|
+
unless File.exist?(path)
|
|
176
|
+
|
|
177
|
+
passphrase = File.binread(path)
|
|
178
|
+
raise 'encryption.passphrase is git-crypt ciphertext — unlock the clone' \
|
|
179
|
+
if passphrase.start_with?("\x00GITCRYPT")
|
|
180
|
+
|
|
181
|
+
passphrase.chomp
|
|
144
182
|
end
|
|
145
183
|
|
|
146
184
|
RakeGithub.define_repository_tasks(
|
|
147
185
|
namespace: :github,
|
|
148
186
|
repository: 'infrablocks/rake_ssh'
|
|
149
187
|
) do |t|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
t.
|
|
155
|
-
{
|
|
156
|
-
|
|
157
|
-
public_key: File.read('config/secrets/ci/ssh.public')
|
|
158
|
-
}
|
|
188
|
+
t.access_token = resolve_github_token
|
|
189
|
+
t.secrets = [
|
|
190
|
+
{ name: 'ENCRYPTION_PASSPHRASE', value: read_encryption_passphrase }
|
|
191
|
+
]
|
|
192
|
+
t.environments = [
|
|
193
|
+
{ name: 'release',
|
|
194
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
159
195
|
]
|
|
160
196
|
end
|
|
161
197
|
|
|
162
198
|
namespace :pipeline do
|
|
163
|
-
desc 'Prepare
|
|
199
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
164
200
|
task prepare: %i[
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
circle_ci:ssh_keys:ensure
|
|
168
|
-
github:deploy_keys:ensure
|
|
201
|
+
github:secrets:ensure
|
|
202
|
+
github:environments:ensure
|
|
169
203
|
]
|
|
170
204
|
end
|
|
171
205
|
|
|
@@ -176,6 +210,38 @@ namespace :version do
|
|
|
176
210
|
end
|
|
177
211
|
end
|
|
178
212
|
|
|
213
|
+
namespace :prerelease do
|
|
214
|
+
desc 'Build and push a namespaced pre-release to RubyGems ' \
|
|
215
|
+
'(PR CI only; no bump, no tag, no commit, no push)'
|
|
216
|
+
task :publish, %i[pr_number run_number run_attempt] do |_, args|
|
|
217
|
+
%i[pr_number run_number run_attempt].each do |name|
|
|
218
|
+
raise "Missing task argument: #{name}" if args[name].to_s.empty?
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
version_file = 'lib/rake_ssh/version.rb'
|
|
222
|
+
version_pattern = /(VERSION\s*=\s*')([^']+)(')/
|
|
223
|
+
source = File.read(version_file)
|
|
224
|
+
base = source[version_pattern, 2]
|
|
225
|
+
raise "Could not read VERSION from #{version_file}" unless base
|
|
226
|
+
|
|
227
|
+
version = "#{base}.pr#{args.pr_number}" \
|
|
228
|
+
".#{args.run_number}.#{args.run_attempt}"
|
|
229
|
+
gem_file = "rake_ssh-#{version}.gem"
|
|
230
|
+
begin
|
|
231
|
+
File.write(version_file,
|
|
232
|
+
source.sub(version_pattern, "\\1#{version}\\3"))
|
|
233
|
+
# Build + push directly: `gem release` aborts on the (deliberately)
|
|
234
|
+
# uncommitted version rewrite. PR CI must not tag, commit, or push
|
|
235
|
+
# (contrast the `release` task).
|
|
236
|
+
sh 'gem build rake_ssh.gemspec'
|
|
237
|
+
sh "gem push #{gem_file}"
|
|
238
|
+
ensure
|
|
239
|
+
File.write(version_file, source)
|
|
240
|
+
rm_f gem_file
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
|
|
179
245
|
desc 'Release gem'
|
|
180
246
|
task :release do
|
|
181
247
|
sh 'gem release --tag --push'
|
data/lib/rake_ssh/version.rb
CHANGED
data/rake_ssh.gemspec
CHANGED
|
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
34
34
|
spec.require_paths = ['lib']
|
|
35
35
|
|
|
36
|
-
spec.required_ruby_version = '>= 3.
|
|
36
|
+
spec.required_ruby_version = '>= 3.3'
|
|
37
37
|
|
|
38
38
|
spec.add_dependency 'colored2', '~> 3.1'
|
|
39
39
|
spec.add_dependency 'rake_factory', '~> 0.33'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake_ssh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.0.pre.2
|
|
4
|
+
version: 0.13.0.pre.2.pr157.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- InfraBlocks Maintainers
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-07-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colored2
|
|
@@ -80,7 +80,7 @@ licenses:
|
|
|
80
80
|
- MIT
|
|
81
81
|
metadata:
|
|
82
82
|
rubygems_mfa_required: 'false'
|
|
83
|
-
post_install_message:
|
|
83
|
+
post_install_message:
|
|
84
84
|
rdoc_options: []
|
|
85
85
|
require_paths:
|
|
86
86
|
- lib
|
|
@@ -88,15 +88,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
88
88
|
requirements:
|
|
89
89
|
- - ">="
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: '3.
|
|
91
|
+
version: '3.3'
|
|
92
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- - "
|
|
94
|
+
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
96
|
+
version: '0'
|
|
97
97
|
requirements: []
|
|
98
|
-
rubygems_version: 3.
|
|
99
|
-
signing_key:
|
|
98
|
+
rubygems_version: 3.5.22
|
|
99
|
+
signing_key:
|
|
100
100
|
specification_version: 4
|
|
101
101
|
summary: Rake tasks for managing SSH keys.
|
|
102
102
|
test_files: []
|