thecore_generators 3.17.0 → 3.17.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/lib/generators/thecore/atom/atom_generator.rb +22 -0
- data/lib/thecore_generators/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c30d085a1460df041376b849de31a646b1381d42c1c8e6112d3c70c1be1bf597
|
|
4
|
+
data.tar.gz: 49c2df855bccf5cea7cbef9a47e90777a61e9f4a574c4090ae34936fe6b7d0be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6f543cb83488fed8100de321e9a91aa5dd0923a4de6a650d4f4c5bfceb0543214b8dd1384a7a0f7fa6890eb9250b5097e18c5b2790d3aa8807752d5c10b997e9
|
|
7
|
+
data.tar.gz: 794cff608d48524792491d189658a34cee95323c69af360d32992115789ed6112cfb812853ed3529bd1c507781dacdca28db1267d9c572c4f316ab494988411f
|
|
@@ -106,6 +106,9 @@ module Thecore
|
|
|
106
106
|
# push publishes only after it is green (`needs: test`). The publish job pushes the gem
|
|
107
107
|
# first and tags it after, so a failed push leaves no tag and re-running the workflow
|
|
108
108
|
# retries it; `version_exists` (from the version's tag) skips a version already published.
|
|
109
|
+
# A push that worked before a failed tag push is not repeated on the rerun (the gem
|
|
110
|
+
# host refuses the same version twice): the publish step skips a version the host already
|
|
111
|
+
# has, and the tag and the release follow (Odoo #6259 in mytask-imas).
|
|
109
112
|
# The JUnit report of the green run is attached to the version's GitHub release, the
|
|
110
113
|
# published version's test evidence. The publish step itself (#gempush_yml) depends on
|
|
111
114
|
# --gem-host. Started from createATOM.js's addCICDFiles, whose two bugs (an unmatched `)`
|
|
@@ -222,6 +225,16 @@ module Thecore
|
|
|
222
225
|
env:
|
|
223
226
|
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
|
224
227
|
run: |
|
|
228
|
+
# A rerun after a failed tag push: RubyGems refuses the same version
|
|
229
|
+
# twice, so a version it already has is not pushed again and the tag and the
|
|
230
|
+
# release follow.
|
|
231
|
+
gem_name=$(basename *.gemspec .gemspec)
|
|
232
|
+
published=$(curl -sS --retry 3 -o /dev/null -w '%{http_code}' \\
|
|
233
|
+
"https://rubygems.org/api/v2/rubygems/$gem_name/versions/$version.json") || true
|
|
234
|
+
if [ "$published" = "200" ]; then
|
|
235
|
+
echo "$gem_name $version is already on RubyGems: not pushing it again"
|
|
236
|
+
exit 0
|
|
237
|
+
fi
|
|
225
238
|
mkdir -p $HOME/.gem
|
|
226
239
|
touch $HOME/.gem/credentials
|
|
227
240
|
chmod 0600 $HOME/.gem/credentials
|
|
@@ -241,6 +254,15 @@ module Thecore
|
|
|
241
254
|
env:
|
|
242
255
|
GEM_HOST_API_KEY: ${{secrets.GEMS_REPO_CREDENTIALS}}
|
|
243
256
|
run: |
|
|
257
|
+
# A rerun after a failed tag push: a version the host already has is not
|
|
258
|
+
# pushed again, and the tag and the release follow. The host wants the key for
|
|
259
|
+
# reading too; if the key can't read, the lookup fails and the push runs.
|
|
260
|
+
gem_name=$(basename *.gemspec .gemspec)
|
|
261
|
+
if gem spec --remote "$gem_name" -v "$version" --clear-sources \\
|
|
262
|
+
--source "https://${GEM_HOST_API_KEY}@%<host>s/" >/dev/null 2>&1; then
|
|
263
|
+
echo "$gem_name $version is already on %<host>s: not pushing it again"
|
|
264
|
+
exit 0
|
|
265
|
+
fi
|
|
244
266
|
gem build *.gemspec
|
|
245
267
|
gem push --host %<url>s *.gem
|
|
246
268
|
YAML
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thecore_generators
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.17.
|
|
4
|
+
version: 3.17.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gabriele Tassoni
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|