rake_gpg 0.21.0.pre.2 → 0.21.0.pre.2.pr174.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.lock +87 -78
- data/README.md +4 -4
- data/Rakefile +101 -47
- data/lib/rake_gpg/version.rb +1 -1
- data/rake_gpg.gemspec +1 -2
- metadata +9 -23
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2197411cd3f939cf375cb7cc05b59d9135b67c807027529392a3f4917c73bc68
|
|
4
|
+
data.tar.gz: a44558e0eab4ee7655804a1a1e622cd5805119a0e6c04f66e42838da9f246d97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f32a268aece2da76d0b1eed667a60da772024af3f0db88cc6998ccb068edb9eb8ce2f4f50d93939cd2f62d85b623bd1f86e7110c3cf2706ec84e44a68484cefe
|
|
7
|
+
data.tar.gz: 6966a4a44370231f04191a7123e5024fa86c2f616274916acee12a3e12990975a48fc2cdb75e39d78f29a01e07d6fb48f1527c51a05298464ac431dcfa3b5eae
|
data/Gemfile.lock
CHANGED
|
@@ -1,144 +1,153 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rake_gpg (0.21.0.pre.2)
|
|
4
|
+
rake_gpg (0.21.0.pre.2.pr174.1.1)
|
|
5
5
|
rake_factory (~> 0.33)
|
|
6
6
|
ruby_gpg2 (~> 0.12)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (
|
|
11
|
+
activesupport (8.1.3)
|
|
12
12
|
base64
|
|
13
13
|
bigdecimal
|
|
14
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
15
15
|
connection_pool (>= 2.2.5)
|
|
16
16
|
drb
|
|
17
17
|
i18n (>= 1.6, < 2)
|
|
18
|
+
json
|
|
19
|
+
logger (>= 1.4.2)
|
|
18
20
|
minitest (>= 5.1)
|
|
19
|
-
|
|
20
|
-
tzinfo (~> 2.0)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
securerandom (>= 0.3)
|
|
22
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
23
|
+
uri (>= 0.13.1)
|
|
24
|
+
addressable (2.9.0)
|
|
25
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
26
|
+
ast (2.4.3)
|
|
27
|
+
base64 (0.3.0)
|
|
28
|
+
bigdecimal (4.1.2)
|
|
26
29
|
childprocess (5.0.0)
|
|
27
30
|
colored2 (3.1.2)
|
|
28
|
-
concurrent-ruby (1.3.
|
|
29
|
-
connection_pool (
|
|
30
|
-
diff-lcs (1.
|
|
31
|
+
concurrent-ruby (1.3.8)
|
|
32
|
+
connection_pool (3.0.2)
|
|
33
|
+
diff-lcs (1.6.2)
|
|
31
34
|
docile (1.4.0)
|
|
32
|
-
drb (2.2.
|
|
33
|
-
excon (
|
|
34
|
-
fakefs (2.5.0)
|
|
35
|
-
faraday (2.10.0)
|
|
36
|
-
faraday-net_http (>= 2.0, < 3.2)
|
|
35
|
+
drb (2.2.3)
|
|
36
|
+
excon (1.6.0)
|
|
37
37
|
logger
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
fakefs (3.0.0)
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
net-http (0.
|
|
59
|
-
uri
|
|
60
|
-
octokit (
|
|
61
|
-
base64
|
|
64
|
+
lint_roller (1.1.0)
|
|
65
|
+
logger (1.7.0)
|
|
66
|
+
minitest (5.27.0)
|
|
67
|
+
net-http (0.9.1)
|
|
68
|
+
uri (>= 0.11.1)
|
|
69
|
+
octokit (10.0.0)
|
|
62
70
|
faraday (>= 1, < 3)
|
|
63
71
|
sawyer (~> 0.9)
|
|
64
72
|
open4 (1.3.4)
|
|
65
|
-
parallel (1.
|
|
66
|
-
parser (3.3.
|
|
73
|
+
parallel (1.27.0)
|
|
74
|
+
parser (3.3.8.0)
|
|
67
75
|
ast (~> 2.4.1)
|
|
68
76
|
racc
|
|
69
|
-
|
|
70
|
-
|
|
77
|
+
prism (1.4.0)
|
|
78
|
+
public_suffix (7.0.5)
|
|
79
|
+
racc (1.8.1)
|
|
71
80
|
rainbow (3.1.1)
|
|
72
|
-
rake (13.2
|
|
73
|
-
rake_circle_ci (0.11.0)
|
|
74
|
-
colored2 (~> 3.1)
|
|
75
|
-
excon (~> 0.72)
|
|
76
|
-
rake_factory (~> 0.23)
|
|
77
|
-
sshkey (~> 2.0)
|
|
81
|
+
rake (13.4.2)
|
|
78
82
|
rake_factory (0.33.0)
|
|
79
83
|
activesupport (>= 4)
|
|
80
84
|
rake (~> 13.0)
|
|
81
|
-
rake_git (0.
|
|
85
|
+
rake_git (0.3.0.pre.2)
|
|
82
86
|
colored2 (~> 3.1)
|
|
83
87
|
git (~> 1.13, >= 1.13.2)
|
|
84
|
-
rake_factory (
|
|
85
|
-
rake_git_crypt (0.
|
|
88
|
+
rake_factory (~> 0.33)
|
|
89
|
+
rake_git_crypt (0.4.0)
|
|
86
90
|
colored2 (~> 3.1)
|
|
91
|
+
lino (~> 4.1)
|
|
87
92
|
rake_factory (~> 0.33)
|
|
88
93
|
ruby_git_crypt (~> 0.1)
|
|
89
94
|
ruby_gpg2 (~> 0.12)
|
|
90
|
-
rake_github (0.
|
|
95
|
+
rake_github (0.17.0)
|
|
91
96
|
colored2 (~> 3.1)
|
|
92
|
-
octokit (>=
|
|
93
|
-
rake_factory (~> 0.
|
|
94
|
-
|
|
95
|
-
rake_ssh (0.10.0)
|
|
96
|
-
colored2 (~> 3.1)
|
|
97
|
-
rake_factory (~> 0.23)
|
|
97
|
+
octokit (>= 7.0, < 11.0)
|
|
98
|
+
rake_factory (~> 0.33)
|
|
99
|
+
rbnacl (~> 7.1)
|
|
98
100
|
sshkey (~> 2.0)
|
|
101
|
+
rake_slack (0.3.0)
|
|
102
|
+
excon (>= 0.72, < 2.0)
|
|
103
|
+
rake_factory (~> 0.33)
|
|
104
|
+
rbnacl (7.1.2)
|
|
105
|
+
ffi (~> 1)
|
|
99
106
|
rchardet (1.8.0)
|
|
100
|
-
regexp_parser (2.
|
|
101
|
-
|
|
102
|
-
strscan
|
|
103
|
-
rspec (3.13.0)
|
|
107
|
+
regexp_parser (2.10.0)
|
|
108
|
+
rspec (3.13.1)
|
|
104
109
|
rspec-core (~> 3.13.0)
|
|
105
110
|
rspec-expectations (~> 3.13.0)
|
|
106
111
|
rspec-mocks (~> 3.13.0)
|
|
107
|
-
rspec-core (3.13.
|
|
112
|
+
rspec-core (3.13.4)
|
|
108
113
|
rspec-support (~> 3.13.0)
|
|
109
|
-
rspec-expectations (3.13.
|
|
114
|
+
rspec-expectations (3.13.5)
|
|
110
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
111
116
|
rspec-support (~> 3.13.0)
|
|
112
|
-
rspec-mocks (3.13.
|
|
117
|
+
rspec-mocks (3.13.5)
|
|
113
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
114
119
|
rspec-support (~> 3.13.0)
|
|
115
|
-
rspec-support (3.13.
|
|
116
|
-
rubocop (1.
|
|
120
|
+
rspec-support (3.13.4)
|
|
121
|
+
rubocop (1.76.0)
|
|
117
122
|
json (~> 2.3)
|
|
118
|
-
language_server-protocol (
|
|
123
|
+
language_server-protocol (~> 3.17.0.2)
|
|
124
|
+
lint_roller (~> 1.1.0)
|
|
119
125
|
parallel (~> 1.10)
|
|
120
126
|
parser (>= 3.3.0.2)
|
|
121
127
|
rainbow (>= 2.2.2, < 4.0)
|
|
122
|
-
regexp_parser (>= 2.
|
|
123
|
-
|
|
124
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
128
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
129
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
|
125
130
|
ruby-progressbar (~> 1.7)
|
|
126
|
-
unicode-display_width (>= 2.4.0, <
|
|
127
|
-
rubocop-ast (1.
|
|
128
|
-
parser (>= 3.3.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
rubocop (
|
|
131
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
132
|
+
rubocop-ast (1.45.0)
|
|
133
|
+
parser (>= 3.3.7.2)
|
|
134
|
+
prism (~> 1.4)
|
|
135
|
+
rubocop-rake (0.7.1)
|
|
136
|
+
lint_roller (~> 1.1)
|
|
137
|
+
rubocop (>= 1.72.1)
|
|
138
|
+
rubocop-rspec (3.6.0)
|
|
139
|
+
lint_roller (~> 1.1)
|
|
140
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
133
141
|
ruby-progressbar (1.13.0)
|
|
134
142
|
ruby_git_crypt (0.1.0)
|
|
135
143
|
immutable-struct (~> 2.4)
|
|
136
144
|
lino (>= 4.1)
|
|
137
145
|
ruby_gpg2 (0.12.0)
|
|
138
146
|
lino (>= 4.1)
|
|
139
|
-
sawyer (0.9.
|
|
147
|
+
sawyer (0.9.3)
|
|
140
148
|
addressable (>= 2.3.5)
|
|
141
149
|
faraday (>= 0.17.3, < 3)
|
|
150
|
+
securerandom (0.4.1)
|
|
142
151
|
simplecov (0.22.0)
|
|
143
152
|
docile (~> 1.1)
|
|
144
153
|
simplecov-html (~> 0.11)
|
|
@@ -146,11 +155,12 @@ GEM
|
|
|
146
155
|
simplecov-html (0.12.3)
|
|
147
156
|
simplecov_json_formatter (0.1.4)
|
|
148
157
|
sshkey (2.0.0)
|
|
149
|
-
strscan (3.1.0)
|
|
150
158
|
tzinfo (2.0.6)
|
|
151
159
|
concurrent-ruby (~> 1.0)
|
|
152
|
-
unicode-display_width (
|
|
153
|
-
|
|
160
|
+
unicode-display_width (3.1.4)
|
|
161
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
162
|
+
unicode-emoji (4.0.4)
|
|
163
|
+
uri (1.1.1)
|
|
154
164
|
|
|
155
165
|
PLATFORMS
|
|
156
166
|
arm64-darwin-21
|
|
@@ -164,12 +174,11 @@ DEPENDENCIES
|
|
|
164
174
|
fakefs
|
|
165
175
|
gem-release
|
|
166
176
|
rake
|
|
167
|
-
rake_circle_ci
|
|
168
177
|
rake_git
|
|
169
178
|
rake_git_crypt
|
|
170
179
|
rake_github
|
|
171
180
|
rake_gpg!
|
|
172
|
-
|
|
181
|
+
rake_slack
|
|
173
182
|
rspec
|
|
174
183
|
rubocop
|
|
175
184
|
rubocop-rake
|
data/README.md
CHANGED
|
@@ -35,16 +35,16 @@ release a new version, update the version number in `version.rb`, and then run
|
|
|
35
35
|
git commits and tags, and push the `.gem` file to
|
|
36
36
|
[rubygems.org](https://rubygems.org).
|
|
37
37
|
|
|
38
|
-
### Managing
|
|
38
|
+
### Managing CI keys
|
|
39
39
|
|
|
40
|
-
To encrypt a GPG key for use by
|
|
40
|
+
To encrypt a GPG key for use by CI:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
43
|
openssl aes-256-cbc \
|
|
44
44
|
-e \
|
|
45
45
|
-md sha1 \
|
|
46
46
|
-in ./config/secrets/ci/gpg.private \
|
|
47
|
-
-out ./.
|
|
47
|
+
-out ./.github/gpg.private.enc \
|
|
48
48
|
-k "<passphrase>"
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ To check decryption is working correctly:
|
|
|
54
54
|
openssl aes-256-cbc \
|
|
55
55
|
-d \
|
|
56
56
|
-md sha1 \
|
|
57
|
-
-in ./.
|
|
57
|
+
-in ./.github/gpg.private.enc \
|
|
58
58
|
-k "<passphrase>"
|
|
59
59
|
```
|
|
60
60
|
|
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,89 @@ 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_gpg.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
|
-
RakeCircleCI.define_project_tasks(
|
|
125
|
-
namespace: :circle_ci,
|
|
126
|
-
project_slug: 'github/infrablocks/rake_gpg'
|
|
127
|
-
) do |t|
|
|
128
|
-
circle_ci_config =
|
|
129
|
-
YAML.load_file('config/secrets/circle_ci/config.yaml')
|
|
130
|
-
|
|
131
|
-
t.api_token = circle_ci_config['circle_ci_api_token']
|
|
132
|
-
t.environment_variables = {
|
|
133
|
-
ENCRYPTION_PASSPHRASE:
|
|
134
|
-
File.read('config/secrets/ci/encryption.passphrase')
|
|
135
|
-
.chomp
|
|
136
|
-
}
|
|
137
|
-
t.checkout_keys = []
|
|
138
|
-
t.ssh_keys = [
|
|
139
|
-
{
|
|
140
|
-
hostname: 'github.com',
|
|
141
|
-
private_key: File.read('config/secrets/ci/ssh.private')
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
end
|
|
145
|
-
|
|
146
119
|
RakeGithub.define_repository_tasks(
|
|
147
120
|
namespace: :github,
|
|
148
121
|
repository: 'infrablocks/rake_gpg'
|
|
149
122
|
) do |t|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
123
|
+
# Operator's ambient auth. Resolve once and fail fast: a missing,
|
|
124
|
+
# unauthenticated, or absent gh yields an empty string, which would
|
|
125
|
+
# otherwise surface later as an opaque Octokit 401.
|
|
126
|
+
github_token = ENV.fetch('GITHUB_TOKEN') do
|
|
127
|
+
`gh auth token`
|
|
128
|
+
rescue Errno::ENOENT
|
|
129
|
+
''
|
|
130
|
+
end.strip
|
|
131
|
+
if github_token.empty?
|
|
132
|
+
raise 'No GitHub token available: set GITHUB_TOKEN or run `gh auth login`'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
t.access_token = github_token
|
|
136
|
+
|
|
137
|
+
# Actions store only: dependabot runs never reach the passphrase — the
|
|
138
|
+
# only pr.yaml job that unlocks git-crypt (prerelease) is guarded to
|
|
139
|
+
# same-repo human PRs. Guard against a locked clone: without
|
|
140
|
+
# it, File.read returns git-crypt ciphertext and github:secrets:ensure
|
|
141
|
+
# silently uploads garbage that only surfaces much later as an opaque
|
|
142
|
+
# GPG unlock failure in the release job.
|
|
143
|
+
passphrase = File.binread('config/secrets/ci/encryption.passphrase')
|
|
144
|
+
if passphrase.start_with?("\x00GITCRYPT")
|
|
145
|
+
raise 'encryption.passphrase is git-crypt ciphertext — unlock the ' \
|
|
146
|
+
'clone before provisioning'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
t.secrets = [
|
|
150
|
+
{ name: 'ENCRYPTION_PASSPHRASE', value: passphrase.chomp }
|
|
159
151
|
]
|
|
152
|
+
t.environments = [
|
|
153
|
+
{ name: 'release',
|
|
154
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
155
|
+
]
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
namespace :slack do
|
|
159
|
+
RakeSlack.define_notification_tasks do |t|
|
|
160
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
161
|
+
t.routing_rules = [
|
|
162
|
+
{ when: { type: 'on_hold' },
|
|
163
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
164
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
165
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
166
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
167
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
168
|
+
{ when: { outcome: 'success' },
|
|
169
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
170
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
171
|
+
# out of a popular channel while this pipeline beds in.
|
|
172
|
+
{ when: {},
|
|
173
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
174
|
+
]
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
namespace :repository do
|
|
179
|
+
desc 'Set the git author for CI'
|
|
180
|
+
task :set_ci_author do
|
|
181
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
182
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
183
|
+
end
|
|
160
184
|
end
|
|
161
185
|
|
|
162
186
|
namespace :pipeline do
|
|
163
|
-
desc 'Prepare
|
|
187
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
164
188
|
task prepare: %i[
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
circle_ci:ssh_keys:ensure
|
|
168
|
-
github:deploy_keys:ensure
|
|
189
|
+
github:secrets:ensure
|
|
190
|
+
github:environments:ensure
|
|
169
191
|
]
|
|
170
192
|
end
|
|
171
193
|
|
|
@@ -181,6 +203,38 @@ task :release do
|
|
|
181
203
|
sh 'gem release --tag --push'
|
|
182
204
|
end
|
|
183
205
|
|
|
206
|
+
namespace :prerelease do
|
|
207
|
+
desc 'Build and push a namespaced pre-release to RubyGems ' \
|
|
208
|
+
'(PR CI only; no bump, no tag, no commit, no push)'
|
|
209
|
+
task :publish, %i[pr_number run_number run_attempt] do |_, args|
|
|
210
|
+
%i[pr_number run_number run_attempt].each do |name|
|
|
211
|
+
raise "Missing task argument: #{name}" if args[name].to_s.empty?
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
version_file = 'lib/rake_gpg/version.rb'
|
|
215
|
+
version_pattern = /(VERSION\s*=\s*')([^']+)(')/
|
|
216
|
+
source = File.read(version_file)
|
|
217
|
+
base = source[version_pattern, 2]
|
|
218
|
+
raise "Could not read VERSION from #{version_file}" unless base
|
|
219
|
+
|
|
220
|
+
version = "#{base}.pr#{args.pr_number}" \
|
|
221
|
+
".#{args.run_number}.#{args.run_attempt}"
|
|
222
|
+
gem_file = "rake_gpg-#{version}.gem"
|
|
223
|
+
begin
|
|
224
|
+
File.write(version_file,
|
|
225
|
+
source.sub(version_pattern, "\\1#{version}\\3"))
|
|
226
|
+
# Build + push directly: `gem release` aborts on the (deliberately)
|
|
227
|
+
# uncommitted version rewrite. PR CI must not tag, commit, or push
|
|
228
|
+
# (contrast the `release` task).
|
|
229
|
+
sh 'gem build rake_gpg.gemspec'
|
|
230
|
+
sh "gem push #{gem_file}"
|
|
231
|
+
ensure
|
|
232
|
+
File.write(version_file, source)
|
|
233
|
+
rm_f gem_file
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
184
238
|
def bump_version_for(version_type)
|
|
185
239
|
sh "gem bump --version #{version_type} " \
|
|
186
240
|
'&& bundle install ' \
|
data/lib/rake_gpg/version.rb
CHANGED
data/rake_gpg.gemspec
CHANGED
|
@@ -45,12 +45,11 @@ Gem::Specification.new do |spec|
|
|
|
45
45
|
spec.add_development_dependency 'fakefs'
|
|
46
46
|
spec.add_development_dependency 'gem-release'
|
|
47
47
|
spec.add_development_dependency 'rake'
|
|
48
|
-
spec.add_development_dependency 'rake_circle_ci'
|
|
49
48
|
spec.add_development_dependency 'rake_git'
|
|
50
49
|
spec.add_development_dependency 'rake_git_crypt'
|
|
51
50
|
spec.add_development_dependency 'rake_github'
|
|
52
51
|
spec.add_development_dependency 'rake_gpg'
|
|
53
|
-
spec.add_development_dependency '
|
|
52
|
+
spec.add_development_dependency 'rake_slack'
|
|
54
53
|
spec.add_development_dependency 'rspec'
|
|
55
54
|
spec.add_development_dependency 'rubocop'
|
|
56
55
|
spec.add_development_dependency 'rubocop-rake'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake_gpg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.21.0.pre.2
|
|
4
|
+
version: 0.21.0.pre.2.pr174.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: rake_factory
|
|
@@ -108,20 +108,6 @@ dependencies:
|
|
|
108
108
|
- - ">="
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
|
-
- !ruby/object:Gem::Dependency
|
|
112
|
-
name: rake_circle_ci
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - ">="
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - ">="
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0'
|
|
125
111
|
- !ruby/object:Gem::Dependency
|
|
126
112
|
name: rake_git
|
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -179,7 +165,7 @@ dependencies:
|
|
|
179
165
|
- !ruby/object:Gem::Version
|
|
180
166
|
version: '0'
|
|
181
167
|
- !ruby/object:Gem::Dependency
|
|
182
|
-
name:
|
|
168
|
+
name: rake_slack
|
|
183
169
|
requirement: !ruby/object:Gem::Requirement
|
|
184
170
|
requirements:
|
|
185
171
|
- - ">="
|
|
@@ -294,7 +280,7 @@ licenses:
|
|
|
294
280
|
- MIT
|
|
295
281
|
metadata:
|
|
296
282
|
rubygems_mfa_required: 'false'
|
|
297
|
-
post_install_message:
|
|
283
|
+
post_install_message:
|
|
298
284
|
rdoc_options: []
|
|
299
285
|
require_paths:
|
|
300
286
|
- lib
|
|
@@ -305,12 +291,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
305
291
|
version: '3.1'
|
|
306
292
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
307
293
|
requirements:
|
|
308
|
-
- - "
|
|
294
|
+
- - ">="
|
|
309
295
|
- !ruby/object:Gem::Version
|
|
310
|
-
version:
|
|
296
|
+
version: '0'
|
|
311
297
|
requirements: []
|
|
312
|
-
rubygems_version: 3.
|
|
313
|
-
signing_key:
|
|
298
|
+
rubygems_version: 3.5.22
|
|
299
|
+
signing_key:
|
|
314
300
|
specification_version: 4
|
|
315
301
|
summary: Rake tasks for managing GPG activities.
|
|
316
302
|
test_files: []
|