rake_git 0.3.0.pre.2 → 0.3.0.pre.2.pr125.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 -2
- data/Gemfile.lock +91 -79
- data/README.md +4 -4
- data/Rakefile +110 -47
- data/lib/rake_git/version.rb +1 -1
- data/rake_git.gemspec +2 -2
- metadata +15 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 80ffb500eeb191753b915d0f941d881ae6995fe1aa1ea20f046bc9b20700e4cb
|
|
4
|
+
data.tar.gz: 0c71cc5f771603565c367351a7a123340f4987e85de8d8b9183562ebb9f4f465
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d32e7eade9993d64ade624b516a3ac53a0730b9197a6948f3427cf8e254844e149f99e8fc5260b64e48683b22a193a29eee1c4aaac7f14a079bdaed1ecbdaf85
|
|
7
|
+
data.tar.gz: 6c4b46748635dfc125bf9005e330a17f18838d9b0752860439473d9c8825e1b4239d6bc216f5e493c3482717111f474e421e44a01623c4be952392b8b25a36f9
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,144 +1,156 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rake_git (0.3.0.pre.2)
|
|
4
|
+
rake_git (0.3.0.pre.2.pr125.1.1)
|
|
5
5
|
colored2 (~> 3.1)
|
|
6
|
-
git (
|
|
6
|
+
git (>= 1.13.2, < 4.0)
|
|
7
7
|
rake_factory (~> 0.33)
|
|
8
8
|
|
|
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
|
-
|
|
41
|
-
|
|
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)
|
|
50
|
+
git (3.1.0)
|
|
51
|
+
activesupport (>= 5.0)
|
|
42
52
|
addressable (~> 2.8)
|
|
43
|
-
|
|
53
|
+
process_executer (~> 1.3)
|
|
54
|
+
rchardet (~> 1.9)
|
|
44
55
|
hamster (3.0.0)
|
|
45
56
|
concurrent-ruby (~> 1.0)
|
|
46
|
-
i18n (1.
|
|
57
|
+
i18n (1.15.2)
|
|
47
58
|
concurrent-ruby (~> 1.0)
|
|
48
|
-
immutable-struct (2.
|
|
49
|
-
json (2.
|
|
50
|
-
language_server-protocol (3.17.0.
|
|
59
|
+
immutable-struct (2.5.0)
|
|
60
|
+
json (2.12.2)
|
|
61
|
+
language_server-protocol (3.17.0.5)
|
|
51
62
|
lino (4.1.0)
|
|
52
63
|
childprocess (~> 5.0.0)
|
|
53
64
|
hamster (~> 3.0)
|
|
54
65
|
open4 (~> 1.3)
|
|
55
|
-
|
|
66
|
+
lint_roller (1.1.0)
|
|
67
|
+
logger (1.7.0)
|
|
56
68
|
memfs (1.0.0)
|
|
57
|
-
minitest (5.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
octokit (8.1.0)
|
|
62
|
-
base64
|
|
69
|
+
minitest (5.27.0)
|
|
70
|
+
net-http (0.9.1)
|
|
71
|
+
uri (>= 0.11.1)
|
|
72
|
+
octokit (10.0.0)
|
|
63
73
|
faraday (>= 1, < 3)
|
|
64
74
|
sawyer (~> 0.9)
|
|
65
75
|
open4 (1.3.4)
|
|
66
|
-
parallel (1.
|
|
67
|
-
parser (3.3.
|
|
76
|
+
parallel (1.27.0)
|
|
77
|
+
parser (3.3.8.0)
|
|
68
78
|
ast (~> 2.4.1)
|
|
69
79
|
racc
|
|
70
|
-
|
|
71
|
-
|
|
80
|
+
prism (1.4.0)
|
|
81
|
+
process_executer (1.3.0)
|
|
82
|
+
public_suffix (7.0.5)
|
|
83
|
+
racc (1.8.1)
|
|
72
84
|
rainbow (3.1.1)
|
|
73
|
-
rake (13.2
|
|
74
|
-
rake_circle_ci (0.11.0)
|
|
75
|
-
colored2 (~> 3.1)
|
|
76
|
-
excon (~> 0.72)
|
|
77
|
-
rake_factory (~> 0.23)
|
|
78
|
-
sshkey (~> 2.0)
|
|
85
|
+
rake (13.4.2)
|
|
79
86
|
rake_factory (0.33.0)
|
|
80
87
|
activesupport (>= 4)
|
|
81
88
|
rake (~> 13.0)
|
|
82
|
-
rake_git_crypt (0.
|
|
89
|
+
rake_git_crypt (0.4.0)
|
|
83
90
|
colored2 (~> 3.1)
|
|
91
|
+
lino (~> 4.1)
|
|
84
92
|
rake_factory (~> 0.33)
|
|
85
93
|
ruby_git_crypt (~> 0.1)
|
|
86
94
|
ruby_gpg2 (~> 0.12)
|
|
87
|
-
rake_github (0.
|
|
95
|
+
rake_github (0.17.0)
|
|
88
96
|
colored2 (~> 3.1)
|
|
89
|
-
octokit (>=
|
|
90
|
-
rake_factory (~> 0.
|
|
97
|
+
octokit (>= 7.0, < 11.0)
|
|
98
|
+
rake_factory (~> 0.33)
|
|
99
|
+
rbnacl (~> 7.1)
|
|
91
100
|
sshkey (~> 2.0)
|
|
92
101
|
rake_gpg (0.20.0)
|
|
93
102
|
rake_factory (~> 0.33)
|
|
94
103
|
ruby_gpg2 (~> 0.12)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
rake_factory (~> 0.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
rspec (3.13.0)
|
|
104
|
+
rake_slack (0.3.0)
|
|
105
|
+
excon (>= 0.72, < 2.0)
|
|
106
|
+
rake_factory (~> 0.33)
|
|
107
|
+
rbnacl (7.1.2)
|
|
108
|
+
ffi (~> 1)
|
|
109
|
+
rchardet (1.9.0)
|
|
110
|
+
regexp_parser (2.10.0)
|
|
111
|
+
rspec (3.13.1)
|
|
104
112
|
rspec-core (~> 3.13.0)
|
|
105
113
|
rspec-expectations (~> 3.13.0)
|
|
106
114
|
rspec-mocks (~> 3.13.0)
|
|
107
|
-
rspec-core (3.13.
|
|
115
|
+
rspec-core (3.13.4)
|
|
108
116
|
rspec-support (~> 3.13.0)
|
|
109
|
-
rspec-expectations (3.13.
|
|
117
|
+
rspec-expectations (3.13.5)
|
|
110
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
111
119
|
rspec-support (~> 3.13.0)
|
|
112
|
-
rspec-mocks (3.13.
|
|
120
|
+
rspec-mocks (3.13.5)
|
|
113
121
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
114
122
|
rspec-support (~> 3.13.0)
|
|
115
|
-
rspec-support (3.13.
|
|
116
|
-
rubocop (1.
|
|
123
|
+
rspec-support (3.13.4)
|
|
124
|
+
rubocop (1.76.0)
|
|
117
125
|
json (~> 2.3)
|
|
118
|
-
language_server-protocol (
|
|
126
|
+
language_server-protocol (~> 3.17.0.2)
|
|
127
|
+
lint_roller (~> 1.1.0)
|
|
119
128
|
parallel (~> 1.10)
|
|
120
129
|
parser (>= 3.3.0.2)
|
|
121
130
|
rainbow (>= 2.2.2, < 4.0)
|
|
122
|
-
regexp_parser (>= 2.
|
|
123
|
-
|
|
124
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
131
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
132
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
|
125
133
|
ruby-progressbar (~> 1.7)
|
|
126
|
-
unicode-display_width (>= 2.4.0, <
|
|
127
|
-
rubocop-ast (1.
|
|
128
|
-
parser (>= 3.3.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
rubocop (
|
|
134
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
135
|
+
rubocop-ast (1.45.0)
|
|
136
|
+
parser (>= 3.3.7.2)
|
|
137
|
+
prism (~> 1.4)
|
|
138
|
+
rubocop-rake (0.7.1)
|
|
139
|
+
lint_roller (~> 1.1)
|
|
140
|
+
rubocop (>= 1.72.1)
|
|
141
|
+
rubocop-rspec (3.6.0)
|
|
142
|
+
lint_roller (~> 1.1)
|
|
143
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
133
144
|
ruby-progressbar (1.13.0)
|
|
134
145
|
ruby_git_crypt (0.1.0)
|
|
135
146
|
immutable-struct (~> 2.4)
|
|
136
147
|
lino (>= 4.1)
|
|
137
148
|
ruby_gpg2 (0.12.0)
|
|
138
149
|
lino (>= 4.1)
|
|
139
|
-
sawyer (0.9.
|
|
150
|
+
sawyer (0.9.3)
|
|
140
151
|
addressable (>= 2.3.5)
|
|
141
152
|
faraday (>= 0.17.3, < 3)
|
|
153
|
+
securerandom (0.4.1)
|
|
142
154
|
simplecov (0.22.0)
|
|
143
155
|
docile (~> 1.1)
|
|
144
156
|
simplecov-html (~> 0.11)
|
|
@@ -146,11 +158,12 @@ GEM
|
|
|
146
158
|
simplecov-html (0.12.3)
|
|
147
159
|
simplecov_json_formatter (0.1.4)
|
|
148
160
|
sshkey (2.0.0)
|
|
149
|
-
strscan (3.1.0)
|
|
150
161
|
tzinfo (2.0.6)
|
|
151
162
|
concurrent-ruby (~> 1.0)
|
|
152
|
-
unicode-display_width (
|
|
153
|
-
|
|
163
|
+
unicode-display_width (3.1.4)
|
|
164
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
165
|
+
unicode-emoji (4.0.4)
|
|
166
|
+
uri (1.1.1)
|
|
154
167
|
|
|
155
168
|
PLATFORMS
|
|
156
169
|
arm64-darwin-21
|
|
@@ -166,12 +179,11 @@ DEPENDENCIES
|
|
|
166
179
|
gem-release
|
|
167
180
|
memfs
|
|
168
181
|
rake
|
|
169
|
-
rake_circle_ci
|
|
170
182
|
rake_git!
|
|
171
183
|
rake_git_crypt
|
|
172
184
|
rake_github
|
|
173
185
|
rake_gpg
|
|
174
|
-
|
|
186
|
+
rake_slack
|
|
175
187
|
rspec
|
|
176
188
|
rubocop
|
|
177
189
|
rubocop-rake
|
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,60 +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_git.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_git'
|
|
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_git'
|
|
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. An empty or
|
|
126
|
+
# whitespace-only GITHUB_TOKEN is treated as absent so an authenticated
|
|
127
|
+
# operator falls through to `gh auth token` rather than hitting the raise.
|
|
128
|
+
github_token = ENV['GITHUB_TOKEN'].to_s.strip
|
|
129
|
+
if github_token.empty?
|
|
130
|
+
github_token = begin
|
|
131
|
+
`gh auth token`
|
|
132
|
+
rescue Errno::ENOENT
|
|
133
|
+
''
|
|
134
|
+
end.strip
|
|
135
|
+
end
|
|
136
|
+
if github_token.empty?
|
|
137
|
+
raise 'No GitHub token available: set GITHUB_TOKEN or run `gh auth login`'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
t.access_token = github_token
|
|
141
|
+
|
|
142
|
+
# Actions store only: dependabot runs never reach the passphrase — the
|
|
143
|
+
# only pr.yaml job that unlocks git-crypt (prerelease) is guarded to
|
|
144
|
+
# same-repo human PRs. Guard against a locked clone: without
|
|
145
|
+
# it, File.read returns git-crypt ciphertext and github:secrets:ensure
|
|
146
|
+
# silently uploads garbage that only surfaces much later as an opaque
|
|
147
|
+
# GPG unlock failure in the release job.
|
|
148
|
+
passphrase_path = 'config/secrets/ci/encryption.passphrase'
|
|
149
|
+
unless File.exist?(passphrase_path)
|
|
150
|
+
raise "Passphrase file not found: #{passphrase_path} — expected a " \
|
|
151
|
+
'git-crypt-unlocked clone with the CI secrets present'
|
|
152
|
+
end
|
|
153
|
+
passphrase = File.binread(passphrase_path)
|
|
154
|
+
if passphrase.start_with?("\x00GITCRYPT")
|
|
155
|
+
raise 'encryption.passphrase is git-crypt ciphertext — unlock the ' \
|
|
156
|
+
'clone before provisioning'
|
|
157
|
+
end
|
|
158
|
+
t.secrets = [
|
|
159
|
+
{ name: 'ENCRYPTION_PASSPHRASE', value: passphrase.chomp }
|
|
160
|
+
]
|
|
161
|
+
t.environments = [
|
|
162
|
+
{ name: 'release',
|
|
163
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
159
164
|
]
|
|
160
165
|
end
|
|
161
166
|
|
|
162
167
|
namespace :pipeline do
|
|
163
|
-
desc 'Prepare
|
|
168
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
164
169
|
task prepare: %i[
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
circle_ci:ssh_keys:ensure
|
|
168
|
-
github:deploy_keys:ensure
|
|
170
|
+
github:secrets:ensure
|
|
171
|
+
github:environments:ensure
|
|
169
172
|
]
|
|
170
173
|
end
|
|
171
174
|
|
|
175
|
+
namespace :slack do
|
|
176
|
+
RakeSlack.define_notification_tasks do |t|
|
|
177
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
178
|
+
t.routing_rules = [
|
|
179
|
+
{ when: { type: 'on_hold' },
|
|
180
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
181
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
182
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
183
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
184
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
185
|
+
{ when: { outcome: 'success' },
|
|
186
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
187
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
188
|
+
# out of a popular channel while this pipeline beds in.
|
|
189
|
+
{ when: {},
|
|
190
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
191
|
+
]
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
namespace :repository do
|
|
196
|
+
desc 'Set the git author for CI'
|
|
197
|
+
task :set_ci_author do
|
|
198
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
199
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
172
203
|
namespace :version do
|
|
173
204
|
desc 'Bump version for specified type (pre, major, minor, patch)'
|
|
174
205
|
task :bump, [:type] do |_, args|
|
|
@@ -176,6 +207,38 @@ namespace :version do
|
|
|
176
207
|
end
|
|
177
208
|
end
|
|
178
209
|
|
|
210
|
+
namespace :prerelease do
|
|
211
|
+
desc 'Build and push a namespaced pre-release to RubyGems ' \
|
|
212
|
+
'(PR CI only; no bump, no tag, no commit, no push)'
|
|
213
|
+
task :publish, %i[pr_number run_number run_attempt] do |_, args|
|
|
214
|
+
%i[pr_number run_number run_attempt].each do |name|
|
|
215
|
+
raise "Missing task argument: #{name}" if args[name].to_s.empty?
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
version_file = 'lib/rake_git/version.rb'
|
|
219
|
+
version_pattern = /(VERSION\s*=\s*')([^']+)(')/
|
|
220
|
+
source = File.read(version_file)
|
|
221
|
+
base = source[version_pattern, 2]
|
|
222
|
+
raise "Could not read VERSION from #{version_file}" unless base
|
|
223
|
+
|
|
224
|
+
version = "#{base}.pr#{args.pr_number}" \
|
|
225
|
+
".#{args.run_number}.#{args.run_attempt}"
|
|
226
|
+
gem_file = "rake_git-#{version}.gem"
|
|
227
|
+
begin
|
|
228
|
+
File.write(version_file,
|
|
229
|
+
source.sub(version_pattern, "\\1#{version}\\3"))
|
|
230
|
+
# Build + push directly: `gem release` aborts on the (deliberately)
|
|
231
|
+
# uncommitted version rewrite. PR CI must not tag, commit, or push
|
|
232
|
+
# (contrast the `release` task).
|
|
233
|
+
sh 'gem build rake_git.gemspec'
|
|
234
|
+
sh "gem push #{gem_file}"
|
|
235
|
+
ensure
|
|
236
|
+
File.write(version_file, source)
|
|
237
|
+
rm_f gem_file
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
179
242
|
desc 'Release gem'
|
|
180
243
|
task :release do
|
|
181
244
|
sh 'gem release --tag --push'
|
data/lib/rake_git/version.rb
CHANGED
data/rake_git.gemspec
CHANGED
|
@@ -34,10 +34,10 @@ Gem::Specification.new do |spec|
|
|
|
34
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
35
35
|
spec.require_paths = ['lib']
|
|
36
36
|
|
|
37
|
-
spec.required_ruby_version = '>= 3.
|
|
37
|
+
spec.required_ruby_version = '>= 3.3'
|
|
38
38
|
|
|
39
39
|
spec.add_dependency 'colored2', '~> 3.1'
|
|
40
|
-
spec.add_dependency 'git', '
|
|
40
|
+
spec.add_dependency 'git', '>= 1.13.2', '< 4.0'
|
|
41
41
|
spec.add_dependency 'rake_factory', '~> 0.33'
|
|
42
42
|
|
|
43
43
|
spec.metadata['rubygems_mfa_required'] = 'false'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake_git
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.0.pre.2
|
|
4
|
+
version: 0.3.0.pre.2.pr125.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
|
|
@@ -28,22 +28,22 @@ dependencies:
|
|
|
28
28
|
name: git
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "~>"
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '1.13'
|
|
34
31
|
- - ">="
|
|
35
32
|
- !ruby/object:Gem::Version
|
|
36
33
|
version: 1.13.2
|
|
34
|
+
- - "<"
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '4.0'
|
|
37
37
|
type: :runtime
|
|
38
38
|
prerelease: false
|
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
40
40
|
requirements:
|
|
41
|
-
- - "~>"
|
|
42
|
-
- !ruby/object:Gem::Version
|
|
43
|
-
version: '1.13'
|
|
44
41
|
- - ">="
|
|
45
42
|
- !ruby/object:Gem::Version
|
|
46
43
|
version: 1.13.2
|
|
44
|
+
- - "<"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '4.0'
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: rake_factory
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,7 +85,7 @@ licenses:
|
|
|
85
85
|
- MIT
|
|
86
86
|
metadata:
|
|
87
87
|
rubygems_mfa_required: 'false'
|
|
88
|
-
post_install_message:
|
|
88
|
+
post_install_message:
|
|
89
89
|
rdoc_options: []
|
|
90
90
|
require_paths:
|
|
91
91
|
- lib
|
|
@@ -93,15 +93,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
93
93
|
requirements:
|
|
94
94
|
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '3.
|
|
96
|
+
version: '3.3'
|
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
requirements:
|
|
99
|
-
- - "
|
|
99
|
+
- - ">="
|
|
100
100
|
- !ruby/object:Gem::Version
|
|
101
|
-
version:
|
|
101
|
+
version: '0'
|
|
102
102
|
requirements: []
|
|
103
|
-
rubygems_version: 3.
|
|
104
|
-
signing_key:
|
|
103
|
+
rubygems_version: 3.5.22
|
|
104
|
+
signing_key:
|
|
105
105
|
specification_version: 4
|
|
106
106
|
summary: Rake tasks for interacting with git.
|
|
107
107
|
test_files: []
|