lino 4.2.0.pre.2.pr177.6.1 → 4.2.0.pre.2.pr178.7.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -1
  3. data/Rakefile +31 -23
  4. data/lib/lino/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29f738b7ef8e8f43deaaa4c12abfc8a8cbdd8977439bc4275bd4bf3fe18c1a38
4
- data.tar.gz: c333805c6443bb3035f033b9f836567385fa7b94313759e43918f09a16c759bc
3
+ metadata.gz: c17fc1f373d4f4585773f17ec3a8aa7be799624c2402056283600e973f16b044
4
+ data.tar.gz: 983c0c16e3d97e962bc95e363e870df116fd5ec028d0baf46e17c4b9e5dfc14b
5
5
  SHA512:
6
- metadata.gz: 87a70c6a90b03c00ffc8ebfa6b1475cef349b3b719859ae73d8de5be4cee8afa3f418f09d9e446f29c387d3bf024b8ad906da52ab84b06f452c40ce39f98110e
7
- data.tar.gz: f35c322eda34d253b7027e76e521e9f44973e7ced6344af795851d471ed0b1c61d8eab048c6082e4498f176816261101dd14d9bc137c85636f52c85531944fdf
6
+ metadata.gz: f2f791809570e7b409cb30617b6aac3fbc014e1b052677bcc8aa7c246b7d888a73aa6733e5e2288f80008ba8d88f207a60e89b26dfcca67e1c3d831344233c19
7
+ data.tar.gz: 426ecdf00604796cef352442cc18400914c0cc52946636cc5c737f5878460317dcce15d2e8868215d6bb83d7659b9975c028638c6ef0a27b94af2635e59532f3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lino (4.2.0.pre.2.pr177.6.1)
4
+ lino (4.2.0.pre.2.pr178.7.1)
5
5
  childprocess (>= 5.0, < 5.2)
6
6
  hamster (~> 3.0)
7
7
  open4 (~> 1.3)
@@ -45,6 +45,7 @@ GEM
45
45
  faraday-net_http (3.4.4)
46
46
  net-http (~> 0.5)
47
47
  ffi (1.17.1)
48
+ ffi (1.17.1-x86_64-linux-gnu)
48
49
  formatador (1.1.0)
49
50
  gem-release (2.2.4)
50
51
  git (1.19.1)
@@ -197,6 +198,7 @@ GEM
197
198
 
198
199
  PLATFORMS
199
200
  ruby
201
+ x86_64-linux
200
202
 
201
203
  DEPENDENCIES
202
204
  bundler
data/Rakefile CHANGED
@@ -120,23 +120,23 @@ RakeGithub.define_repository_tasks(
120
120
  namespace: :github,
121
121
  repository: 'infrablocks/lino'
122
122
  ) do |t|
123
- # Operator's ambient auth the stored PAT is gone (see the cutover PR's
124
- # deliberate-decisions list). Resolve once and fail fast: a missing,
123
+ # Operator's ambient auth. Resolve once and fail fast: a missing,
125
124
  # unauthenticated, or absent gh yields an empty string, which would
126
125
  # otherwise surface later as an opaque Octokit 401.
127
126
  github_token = ENV.fetch('GITHUB_TOKEN') do
128
- `gh auth token`.strip
127
+ `gh auth token`
129
128
  rescue Errno::ENOENT
130
129
  ''
131
- end
130
+ end.strip
132
131
  if github_token.empty?
133
132
  raise 'No GitHub token available: set GITHUB_TOKEN or run `gh auth login`'
134
133
  end
135
134
 
136
135
  t.access_token = github_token
137
136
 
138
- # Actions store only: nothing in pr.yaml unlocks git-crypt, so dependabot
139
- # runs never need the passphrase. Guard against a locked clone: without
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
140
  # it, File.read returns git-crypt ciphertext and github:secrets:ensure
141
141
  # silently uploads garbage that only surfaces much later as an opaque
142
142
  # GPG unlock failure in the release job.
@@ -191,34 +191,42 @@ namespace :pipeline do
191
191
  ]
192
192
  end
193
193
 
194
- namespace :version do
195
- desc 'Bump version for specified type (pre, major, minor, patch)'
196
- task :bump, [:type] do |_, args|
197
- bump_version_for(args.type)
198
- end
199
- end
200
-
201
194
  namespace :prerelease do
202
195
  desc 'Build and push a namespaced pre-release to RubyGems ' \
203
196
  '(PR CI only; no bump, no tag, no commit, no push)'
204
197
  task :publish, %i[pr_number run_number run_attempt] do |_, args|
198
+ %i[pr_number run_number run_attempt].each do |name|
199
+ raise "Missing task argument: #{name}" if args[name].to_s.empty?
200
+ end
201
+
205
202
  version_file = 'lib/lino/version.rb'
203
+ version_pattern = /(VERSION\s*=\s*')([^']+)(')/
206
204
  source = File.read(version_file)
207
- base = source[/VERSION\s*=\s*'([^']+)'/, 1]
205
+ base = source[version_pattern, 2]
208
206
  raise "Could not read VERSION from #{version_file}" unless base
209
207
 
210
208
  version = "#{base}.pr#{args.pr_number}" \
211
209
  ".#{args.run_number}.#{args.run_attempt}"
212
- File.write(
213
- version_file,
214
- source.sub(/(VERSION\s*=\s*')[^']+(')/, "\\1#{version}\\2")
215
- )
210
+ gem_file = "lino-#{version}.gem"
211
+ begin
212
+ File.write(version_file,
213
+ source.sub(version_pattern, "\\1#{version}\\3"))
214
+ # Build + push directly: `gem release` aborts on the (deliberately)
215
+ # uncommitted version rewrite. PR CI must not tag, commit, or push
216
+ # (contrast the `release` task).
217
+ sh 'gem build lino.gemspec'
218
+ sh "gem push #{gem_file}"
219
+ ensure
220
+ File.write(version_file, source)
221
+ rm_f gem_file
222
+ end
223
+ end
224
+ end
216
225
 
217
- # Build + push directly rather than via `gem release`, which aborts on
218
- # the (deliberately) uncommitted version rewrite. PR CI must not tag,
219
- # commit, or push (contrast the `release` task).
220
- sh 'gem build lino.gemspec'
221
- sh "gem push lino-#{version}.gem"
226
+ namespace :version do
227
+ desc 'Bump version for specified type (pre, major, minor, patch)'
228
+ task :bump, [:type] do |_, args|
229
+ bump_version_for(args.type)
222
230
  end
223
231
  end
224
232
 
data/lib/lino/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lino
4
- VERSION = '4.2.0.pre.2.pr177.6.1'
4
+ VERSION = '4.2.0.pre.2.pr178.7.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lino
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.pre.2.pr177.6.1
4
+ version: 4.2.0.pre.2.pr178.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfraBlocks Maintainers