rake_npm 0.3.0.pre.2 → 0.3.0.pre.2.pr69.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 +81 -78
- data/README.md +4 -4
- data/Rakefile +110 -47
- data/lib/rake_npm/version.rb +1 -1
- data/rake_npm.gemspec +2 -3
- metadata +10 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67461edba070915df6d111f6adac8a5106d1bbad6d9131edcef6c0eb8d4933d6
|
|
4
|
+
data.tar.gz: ec9633114176a48480fd4157d799ffcd7ed94e3834a8b9829a5bad9735886fa3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cdffbeb8c2b77888c5d2f7319a8d58d49d6bf583abcee202c077d452b99fc00fd6236237423ad2b2a533eb8024854fee3790c56ea8ba26b7cb068f06c78daaac
|
|
7
|
+
data.tar.gz: 28919bf6b1c4022607b744b521116ab9f6a273eb2a474d2714b11c8ffb250bbd220af269dbb9233820c62a544f140a8fcb1a097ba830677e85369b5879f30cfb
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rake_npm (0.3.0.pre.2)
|
|
4
|
+
rake_npm (0.3.0.pre.2.pr69.1.1)
|
|
5
5
|
colored2 (~> 3.1)
|
|
6
6
|
rake_dependencies (~> 3.9)
|
|
7
7
|
rake_factory (~> 0.33)
|
|
@@ -10,76 +10,78 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
activesupport (
|
|
13
|
+
activesupport (8.1.3)
|
|
14
14
|
base64
|
|
15
15
|
bigdecimal
|
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
17
17
|
connection_pool (>= 2.2.5)
|
|
18
18
|
drb
|
|
19
19
|
i18n (>= 1.6, < 2)
|
|
20
|
+
json
|
|
21
|
+
logger (>= 1.4.2)
|
|
20
22
|
minitest (>= 5.1)
|
|
21
|
-
|
|
22
|
-
tzinfo (~> 2.0)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
securerandom (>= 0.3)
|
|
24
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
25
|
+
uri (>= 0.13.1)
|
|
26
|
+
addressable (2.9.0)
|
|
27
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
28
|
+
ast (2.4.3)
|
|
29
|
+
base64 (0.3.0)
|
|
30
|
+
bigdecimal (4.1.2)
|
|
28
31
|
childprocess (5.0.0)
|
|
29
32
|
colored2 (3.1.2)
|
|
30
|
-
concurrent-ruby (1.3.
|
|
31
|
-
connection_pool (
|
|
32
|
-
diff-lcs (1.
|
|
33
|
+
concurrent-ruby (1.3.8)
|
|
34
|
+
connection_pool (3.0.2)
|
|
35
|
+
diff-lcs (1.6.2)
|
|
33
36
|
docile (1.4.0)
|
|
34
37
|
down (5.4.2)
|
|
35
38
|
addressable (~> 2.8)
|
|
36
|
-
drb (2.2.
|
|
37
|
-
excon (
|
|
38
|
-
faraday (2.10.0)
|
|
39
|
-
faraday-net_http (>= 2.0, < 3.2)
|
|
39
|
+
drb (2.2.3)
|
|
40
|
+
excon (1.6.0)
|
|
40
41
|
logger
|
|
41
|
-
faraday
|
|
42
|
-
|
|
42
|
+
faraday (2.14.3)
|
|
43
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
44
|
+
json
|
|
45
|
+
logger
|
|
46
|
+
faraday-net_http (3.4.4)
|
|
47
|
+
net-http (~> 0.5)
|
|
48
|
+
ffi (1.17.4)
|
|
49
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
43
50
|
gem-release (2.2.2)
|
|
44
51
|
git (1.19.1)
|
|
45
52
|
addressable (~> 2.8)
|
|
46
53
|
rchardet (~> 1.8)
|
|
47
54
|
hamster (3.0.0)
|
|
48
55
|
concurrent-ruby (~> 1.0)
|
|
49
|
-
i18n (1.
|
|
56
|
+
i18n (1.15.2)
|
|
50
57
|
concurrent-ruby (~> 1.0)
|
|
51
|
-
immutable-struct (2.
|
|
52
|
-
json (2.
|
|
53
|
-
language_server-protocol (3.17.0.
|
|
58
|
+
immutable-struct (2.5.0)
|
|
59
|
+
json (2.12.2)
|
|
60
|
+
language_server-protocol (3.17.0.5)
|
|
54
61
|
lino (4.1.0)
|
|
55
62
|
childprocess (~> 5.0.0)
|
|
56
63
|
hamster (~> 3.0)
|
|
57
64
|
open4 (~> 1.3)
|
|
58
|
-
|
|
65
|
+
lint_roller (1.1.0)
|
|
66
|
+
logger (1.7.0)
|
|
59
67
|
memfs (1.0.0)
|
|
60
68
|
minitar (0.9)
|
|
61
|
-
minitest (5.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
octokit (8.1.0)
|
|
66
|
-
base64
|
|
69
|
+
minitest (5.27.0)
|
|
70
|
+
net-http (0.9.1)
|
|
71
|
+
uri (>= 0.11.1)
|
|
72
|
+
octokit (10.0.0)
|
|
67
73
|
faraday (>= 1, < 3)
|
|
68
74
|
sawyer (~> 0.9)
|
|
69
75
|
open4 (1.3.4)
|
|
70
|
-
parallel (1.
|
|
71
|
-
parser (3.3.
|
|
76
|
+
parallel (1.27.0)
|
|
77
|
+
parser (3.3.8.0)
|
|
72
78
|
ast (~> 2.4.1)
|
|
73
79
|
racc
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
prism (1.4.0)
|
|
81
|
+
public_suffix (7.0.5)
|
|
82
|
+
racc (1.8.1)
|
|
76
83
|
rainbow (3.1.1)
|
|
77
|
-
rake (13.2
|
|
78
|
-
rake_circle_ci (0.11.0)
|
|
79
|
-
colored2 (~> 3.1)
|
|
80
|
-
excon (~> 0.72)
|
|
81
|
-
rake_factory (~> 0.23)
|
|
82
|
-
sshkey (~> 2.0)
|
|
84
|
+
rake (13.4.2)
|
|
83
85
|
rake_dependencies (3.9.0)
|
|
84
86
|
down (~> 5.3)
|
|
85
87
|
hamster (~> 3.0)
|
|
@@ -93,57 +95,61 @@ GEM
|
|
|
93
95
|
colored2 (~> 3.1)
|
|
94
96
|
git (~> 1.13, >= 1.13.2)
|
|
95
97
|
rake_factory (~> 0.33)
|
|
96
|
-
rake_git_crypt (0.
|
|
98
|
+
rake_git_crypt (0.4.0)
|
|
97
99
|
colored2 (~> 3.1)
|
|
100
|
+
lino (~> 4.1)
|
|
98
101
|
rake_factory (~> 0.33)
|
|
99
102
|
ruby_git_crypt (~> 0.1)
|
|
100
103
|
ruby_gpg2 (~> 0.12)
|
|
101
|
-
rake_github (0.
|
|
104
|
+
rake_github (0.17.0)
|
|
102
105
|
colored2 (~> 3.1)
|
|
103
|
-
octokit (>=
|
|
104
|
-
rake_factory (~> 0.
|
|
106
|
+
octokit (>= 7.0, < 11.0)
|
|
107
|
+
rake_factory (~> 0.33)
|
|
108
|
+
rbnacl (~> 7.1)
|
|
105
109
|
sshkey (~> 2.0)
|
|
106
110
|
rake_gpg (0.20.0)
|
|
107
111
|
rake_factory (~> 0.33)
|
|
108
112
|
ruby_gpg2 (~> 0.12)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
rake_factory (~> 0.
|
|
112
|
-
|
|
113
|
+
rake_slack (0.3.0)
|
|
114
|
+
excon (>= 0.72, < 2.0)
|
|
115
|
+
rake_factory (~> 0.33)
|
|
116
|
+
rbnacl (7.1.2)
|
|
117
|
+
ffi (~> 1)
|
|
113
118
|
rchardet (1.8.0)
|
|
114
|
-
regexp_parser (2.
|
|
115
|
-
|
|
116
|
-
strscan
|
|
117
|
-
rspec (3.13.0)
|
|
119
|
+
regexp_parser (2.10.0)
|
|
120
|
+
rspec (3.13.1)
|
|
118
121
|
rspec-core (~> 3.13.0)
|
|
119
122
|
rspec-expectations (~> 3.13.0)
|
|
120
123
|
rspec-mocks (~> 3.13.0)
|
|
121
|
-
rspec-core (3.13.
|
|
124
|
+
rspec-core (3.13.4)
|
|
122
125
|
rspec-support (~> 3.13.0)
|
|
123
|
-
rspec-expectations (3.13.
|
|
126
|
+
rspec-expectations (3.13.5)
|
|
124
127
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
125
128
|
rspec-support (~> 3.13.0)
|
|
126
|
-
rspec-mocks (3.13.
|
|
129
|
+
rspec-mocks (3.13.5)
|
|
127
130
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
128
131
|
rspec-support (~> 3.13.0)
|
|
129
|
-
rspec-support (3.13.
|
|
130
|
-
rubocop (1.
|
|
132
|
+
rspec-support (3.13.4)
|
|
133
|
+
rubocop (1.75.8)
|
|
131
134
|
json (~> 2.3)
|
|
132
|
-
language_server-protocol (
|
|
135
|
+
language_server-protocol (~> 3.17.0.2)
|
|
136
|
+
lint_roller (~> 1.1.0)
|
|
133
137
|
parallel (~> 1.10)
|
|
134
138
|
parser (>= 3.3.0.2)
|
|
135
139
|
rainbow (>= 2.2.2, < 4.0)
|
|
136
|
-
regexp_parser (>= 2.
|
|
137
|
-
|
|
138
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
140
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
141
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
139
142
|
ruby-progressbar (~> 1.7)
|
|
140
|
-
unicode-display_width (>= 2.4.0, <
|
|
141
|
-
rubocop-ast (1.
|
|
142
|
-
parser (>= 3.3.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
rubocop (
|
|
143
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
144
|
+
rubocop-ast (1.44.1)
|
|
145
|
+
parser (>= 3.3.7.2)
|
|
146
|
+
prism (~> 1.4)
|
|
147
|
+
rubocop-rake (0.7.1)
|
|
148
|
+
lint_roller (~> 1.1)
|
|
149
|
+
rubocop (>= 1.72.1)
|
|
150
|
+
rubocop-rspec (3.6.0)
|
|
151
|
+
lint_roller (~> 1.1)
|
|
152
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
147
153
|
ruby-progressbar (1.13.0)
|
|
148
154
|
ruby_git_crypt (0.1.0)
|
|
149
155
|
immutable-struct (~> 2.4)
|
|
@@ -154,9 +160,10 @@ GEM
|
|
|
154
160
|
immutable-struct (~> 2.4)
|
|
155
161
|
lino (>= 4.1)
|
|
156
162
|
rubyzip (2.3.2)
|
|
157
|
-
sawyer (0.9.
|
|
163
|
+
sawyer (0.9.3)
|
|
158
164
|
addressable (>= 2.3.5)
|
|
159
165
|
faraday (>= 0.17.3, < 3)
|
|
166
|
+
securerandom (0.4.1)
|
|
160
167
|
simplecov (0.22.0)
|
|
161
168
|
docile (~> 1.1)
|
|
162
169
|
simplecov-html (~> 0.11)
|
|
@@ -164,18 +171,15 @@ GEM
|
|
|
164
171
|
simplecov-html (0.12.3)
|
|
165
172
|
simplecov_json_formatter (0.1.4)
|
|
166
173
|
sshkey (2.0.0)
|
|
167
|
-
strscan (3.1.0)
|
|
168
174
|
tzinfo (2.0.6)
|
|
169
175
|
concurrent-ruby (~> 1.0)
|
|
170
|
-
unicode-display_width (
|
|
171
|
-
|
|
176
|
+
unicode-display_width (3.1.4)
|
|
177
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
178
|
+
unicode-emoji (4.0.4)
|
|
179
|
+
uri (1.1.1)
|
|
172
180
|
|
|
173
181
|
PLATFORMS
|
|
174
|
-
arm64-darwin-21
|
|
175
|
-
arm64-darwin-22
|
|
176
182
|
ruby
|
|
177
|
-
x86_64-darwin-19
|
|
178
|
-
x86_64-darwin-21
|
|
179
183
|
x86_64-linux
|
|
180
184
|
|
|
181
185
|
DEPENDENCIES
|
|
@@ -184,13 +188,12 @@ DEPENDENCIES
|
|
|
184
188
|
gem-release
|
|
185
189
|
memfs
|
|
186
190
|
rake
|
|
187
|
-
rake_circle_ci
|
|
188
191
|
rake_git
|
|
189
192
|
rake_git_crypt
|
|
190
193
|
rake_github
|
|
191
194
|
rake_gpg
|
|
192
195
|
rake_npm!
|
|
193
|
-
|
|
196
|
+
rake_slack
|
|
194
197
|
rspec
|
|
195
198
|
rubocop
|
|
196
199
|
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,57 +105,98 @@ 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_npm.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_npm'
|
|
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_npm'
|
|
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 }
|
|
159
160
|
]
|
|
161
|
+
t.environments = [
|
|
162
|
+
{ name: 'release',
|
|
163
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
164
|
+
]
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
namespace :slack do
|
|
168
|
+
RakeSlack.define_notification_tasks do |t|
|
|
169
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
170
|
+
t.routing_rules = [
|
|
171
|
+
{ when: { type: 'on_hold' },
|
|
172
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
173
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
174
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
175
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
176
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
177
|
+
{ when: { outcome: 'success' },
|
|
178
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
179
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
180
|
+
# out of a popular channel while this pipeline beds in.
|
|
181
|
+
{ when: {},
|
|
182
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
183
|
+
]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
namespace :repository do
|
|
188
|
+
desc 'Set the git author for CI'
|
|
189
|
+
task :set_ci_author do
|
|
190
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
191
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
192
|
+
end
|
|
160
193
|
end
|
|
161
194
|
|
|
162
195
|
namespace :pipeline do
|
|
163
|
-
desc 'Prepare
|
|
196
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
164
197
|
task prepare: %i[
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
circle_ci:ssh_keys:ensure
|
|
168
|
-
github:deploy_keys:ensure
|
|
198
|
+
github:secrets:ensure
|
|
199
|
+
github:environments:ensure
|
|
169
200
|
]
|
|
170
201
|
end
|
|
171
202
|
|
|
@@ -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_npm/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_npm-#{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_npm.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_npm/version.rb
CHANGED
data/rake_npm.gemspec
CHANGED
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
|
35
35
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
36
36
|
spec.require_paths = ['lib']
|
|
37
37
|
|
|
38
|
-
spec.required_ruby_version = '>= 3.
|
|
38
|
+
spec.required_ruby_version = '>= 3.3'
|
|
39
39
|
|
|
40
40
|
spec.add_dependency 'colored2', '~> 3.1'
|
|
41
41
|
spec.add_dependency 'rake_dependencies', '~> 3.9'
|
|
@@ -47,12 +47,11 @@ Gem::Specification.new do |spec|
|
|
|
47
47
|
spec.add_development_dependency 'gem-release'
|
|
48
48
|
spec.add_development_dependency 'memfs'
|
|
49
49
|
spec.add_development_dependency 'rake'
|
|
50
|
-
spec.add_development_dependency 'rake_circle_ci'
|
|
51
50
|
spec.add_development_dependency 'rake_git'
|
|
52
51
|
spec.add_development_dependency 'rake_git_crypt'
|
|
53
52
|
spec.add_development_dependency 'rake_github'
|
|
54
53
|
spec.add_development_dependency 'rake_gpg'
|
|
55
|
-
spec.add_development_dependency '
|
|
54
|
+
spec.add_development_dependency 'rake_slack'
|
|
56
55
|
spec.add_development_dependency 'rspec'
|
|
57
56
|
spec.add_development_dependency 'rubocop'
|
|
58
57
|
spec.add_development_dependency 'rubocop-rake'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake_npm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.0.pre.2
|
|
4
|
+
version: 0.3.0.pre.2.pr69.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-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colored2
|
|
@@ -136,20 +136,6 @@ dependencies:
|
|
|
136
136
|
- - ">="
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
|
-
- !ruby/object:Gem::Dependency
|
|
140
|
-
name: rake_circle_ci
|
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
|
142
|
-
requirements:
|
|
143
|
-
- - ">="
|
|
144
|
-
- !ruby/object:Gem::Version
|
|
145
|
-
version: '0'
|
|
146
|
-
type: :development
|
|
147
|
-
prerelease: false
|
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
-
requirements:
|
|
150
|
-
- - ">="
|
|
151
|
-
- !ruby/object:Gem::Version
|
|
152
|
-
version: '0'
|
|
153
139
|
- !ruby/object:Gem::Dependency
|
|
154
140
|
name: rake_git
|
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -207,7 +193,7 @@ dependencies:
|
|
|
207
193
|
- !ruby/object:Gem::Version
|
|
208
194
|
version: '0'
|
|
209
195
|
- !ruby/object:Gem::Dependency
|
|
210
|
-
name:
|
|
196
|
+
name: rake_slack
|
|
211
197
|
requirement: !ruby/object:Gem::Requirement
|
|
212
198
|
requirements:
|
|
213
199
|
- - ">="
|
|
@@ -320,7 +306,7 @@ licenses:
|
|
|
320
306
|
- MIT
|
|
321
307
|
metadata:
|
|
322
308
|
rubygems_mfa_required: 'false'
|
|
323
|
-
post_install_message:
|
|
309
|
+
post_install_message:
|
|
324
310
|
rdoc_options: []
|
|
325
311
|
require_paths:
|
|
326
312
|
- lib
|
|
@@ -328,15 +314,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
328
314
|
requirements:
|
|
329
315
|
- - ">="
|
|
330
316
|
- !ruby/object:Gem::Version
|
|
331
|
-
version: '3.
|
|
317
|
+
version: '3.3'
|
|
332
318
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
333
319
|
requirements:
|
|
334
|
-
- - "
|
|
320
|
+
- - ">="
|
|
335
321
|
- !ruby/object:Gem::Version
|
|
336
|
-
version:
|
|
322
|
+
version: '0'
|
|
337
323
|
requirements: []
|
|
338
|
-
rubygems_version: 3.
|
|
339
|
-
signing_key:
|
|
324
|
+
rubygems_version: 3.5.22
|
|
325
|
+
signing_key:
|
|
340
326
|
specification_version: 4
|
|
341
327
|
summary: Rake tasks for interacting with NPM.
|
|
342
328
|
test_files: []
|