develoz-rails 0.1.0 → 0.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/.github/workflows/release.yml +14 -13
- data/CHANGELOG.md +5 -0
- data/lib/develoz/generators/base.rb +2 -0
- data/lib/develoz/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 19144f588ae403e3b56cad7411f147d332da4e98454d4bdc910d6cf9961aa99b
|
|
4
|
+
data.tar.gz: 6ea41a11e50d5f963954a2032f63ce43ae2a65f131ad4df0d67584ba6e3026fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64932593c83871f432168675fdaa6f9ce03e44463c95b9a88ea97ddac7498075e9d978555da7018d49418104b9097bf21c4719bc6e402724e41162319f9f623a
|
|
7
|
+
data.tar.gz: a0517787d572f2a0a6e7b2691c97b468043df85fa9fe0338aca7d6bd41a44db3dbbd04a193bbf05030218414eb514882e9b052959e18597268688e571a8d3c76
|
|
@@ -217,10 +217,7 @@ jobs:
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
api_url="https://rubygems.org/api/v2/rubygems/develoz-rails/versions/${VERSION}.json"
|
|
220
|
-
checks=
|
|
221
|
-
if (( RUN_ATTEMPT > 1 )); then
|
|
222
|
-
checks=12
|
|
223
|
-
fi
|
|
220
|
+
checks=12
|
|
224
221
|
|
|
225
222
|
status=""
|
|
226
223
|
for ((check = 1; check <= checks; check++)); do
|
|
@@ -247,12 +244,8 @@ jobs:
|
|
|
247
244
|
done
|
|
248
245
|
|
|
249
246
|
if [[ "$status" == "200" ]]; then
|
|
250
|
-
if (( RUN_ATTEMPT == 1 )); then
|
|
251
|
-
echo "::error::develoz-rails ${VERSION} already exists on RubyGems during the first run attempt"
|
|
252
|
-
exit 1
|
|
253
|
-
fi
|
|
254
247
|
echo "should-push=false" >> "$GITHUB_OUTPUT"
|
|
255
|
-
echo "develoz-rails ${VERSION} is already
|
|
248
|
+
echo "develoz-rails ${VERSION} is already published; skipping gem push"
|
|
256
249
|
else
|
|
257
250
|
echo "should-push=true" >> "$GITHUB_OUTPUT"
|
|
258
251
|
fi
|
|
@@ -266,6 +259,8 @@ jobs:
|
|
|
266
259
|
run: gem push "pkg/develoz-rails-${VERSION}.gem"
|
|
267
260
|
|
|
268
261
|
- name: Verify RubyGems API visibility
|
|
262
|
+
env:
|
|
263
|
+
SHOULD_PUSH: ${{ steps.version-state.outputs.should-push }}
|
|
269
264
|
run: |
|
|
270
265
|
set -euo pipefail
|
|
271
266
|
|
|
@@ -301,17 +296,23 @@ jobs:
|
|
|
301
296
|
exit 1
|
|
302
297
|
}
|
|
303
298
|
|
|
304
|
-
API_RESPONSE="$api_response" ruby -rjson -rdigest <<'RUBY'
|
|
299
|
+
API_RESPONSE="$api_response" SHOULD_PUSH="$SHOULD_PUSH" ruby -rjson -rdigest <<'RUBY'
|
|
305
300
|
payload = JSON.parse(File.read(ENV.fetch("API_RESPONSE")))
|
|
306
301
|
version = ENV.fetch("VERSION")
|
|
307
|
-
gem_path = ENV.fetch("GEM_PATH")
|
|
308
|
-
expected_sha = Digest::SHA256.file(gem_path).hexdigest
|
|
309
302
|
|
|
310
303
|
abort "RubyGems API returned the wrong gem name" unless payload.fetch("name") == "develoz-rails"
|
|
311
304
|
abort "RubyGems API returned the wrong version" unless payload.fetch("version") == version
|
|
312
305
|
abort "RubyGems API returned the wrong platform" unless payload.fetch("platform") == "ruby"
|
|
313
306
|
abort "RubyGems API reports the release as yanked" if payload.fetch("yanked")
|
|
314
|
-
|
|
307
|
+
|
|
308
|
+
# Only verify SHA when we pushed the gem in this run
|
|
309
|
+
if ENV.fetch("SHOULD_PUSH") == "true"
|
|
310
|
+
gem_path = ENV.fetch("GEM_PATH")
|
|
311
|
+
expected_sha = Digest::SHA256.file(gem_path).hexdigest
|
|
312
|
+
abort "RubyGems API SHA does not match the built gem" unless payload.fetch("sha") == expected_sha
|
|
313
|
+
else
|
|
314
|
+
puts "Gem was already published; skipping SHA verification"
|
|
315
|
+
end
|
|
315
316
|
RUBY
|
|
316
317
|
|
|
317
318
|
finalize-changelog:
|
data/CHANGELOG.md
CHANGED
data/lib/develoz/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: develoz-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mauricio Zaffari
|
|
@@ -361,8 +361,9 @@ homepage: https://github.com/develoz-com/rails-template
|
|
|
361
361
|
licenses: []
|
|
362
362
|
metadata:
|
|
363
363
|
homepage_uri: https://github.com/develoz-com/rails-template
|
|
364
|
-
source_code_uri: https://github.com/develoz-com/rails-template/tree/v0.1.
|
|
364
|
+
source_code_uri: https://github.com/develoz-com/rails-template/tree/v0.1.1
|
|
365
365
|
changelog_uri: https://github.com/develoz-com/rails-template/blob/main/CHANGELOG.md
|
|
366
|
+
rubygems_mfa_required: 'true'
|
|
366
367
|
rdoc_options: []
|
|
367
368
|
require_paths:
|
|
368
369
|
- lib
|