retag 0.2.1.289789 → 0.2.2.290087

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b02aec116b0797e9023ac8503214e93f4ebd9036b507223133445336d824935f
4
- data.tar.gz: 8c432f0c18632a19c671c764149c0a80d4be7a406fb0f165fdf1cf59b812eb46
3
+ metadata.gz: d08628d204433079ea7b5345a7ee74e0fcc9e2b9b06110383fc9002a238c392a
4
+ data.tar.gz: 1a7e52183548f21bbb8019c07e5e0f13c98c56305d9ebe26a06218122a292566
5
5
  SHA512:
6
- metadata.gz: cb8d95b95b55b01f2aa4dbd2a4fa819a7390135488b560f6ef091eab245dbc07e99eb5f64ef69caf8f3c83fddd70c53b4555d7633b4d8a51294b2ca85571418d
7
- data.tar.gz: 93ae41bea06c2bdf9958b7bcfa6900fc92a38b882ecab7e19d6bc837bff1f744fa1b1fd90bc1c3ab0bb0cef202d13e668ebf72784fec2a3a0c039643d6ac67fc
6
+ metadata.gz: 437fa7228f9cbeb0c1bb301471b81093fb90394874b4ac11849c4d5bf36e02c5866064cc5be10e9ea246171e74ca7e7ae24ace3f6f0ecd6a7b0ba0be7ce40764
7
+ data.tar.gz: 7105927440b35adfe9014b4517fcce922f895df5e98aa8453fc83f83daac5e417d811a81514e645375a785d8c05d32879ea458bf9a68cae900490e1a48468a1c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- retag (0.2.1)
4
+ retag (0.2.2)
5
5
  activesupport (~> 6.0)
6
6
  colorize (~> 0.8.1)
7
7
  gitlab (< 5.0)
data/lib/retag/image.rb CHANGED
@@ -19,7 +19,7 @@ module Retag
19
19
  uri = ::URI.parse("https://#{image}")
20
20
  repo = uri.path
21
21
  repo[0..0] = ''
22
- project, registry = repo.split('/')
22
+ project, *center, registry = repo.split('/')
23
23
  uri.path = ''
24
24
  newrepo = repo
25
25
  newrepo = repo.sub("#{project}/", "#{newproject}/") if newproject
@@ -33,7 +33,10 @@ module Retag
33
33
  file.write(manifest.to_json)
34
34
  file.flush
35
35
 
36
- result = cmd!("curl -s -u '#{dockerauth(uri.host)}' -H 'Content-Type: #{content_type}' -H 'Accept: #{content_type}' -X PUT --data-binary @#{file.path} '#{uri}/v2/#{repo}/manifests/#{newtag}' -o -", capture: true).strip
36
+ if newtag.to_s.strip != tag.to_s.strip
37
+ result = cmd!("curl -s -u '#{dockerauth(uri.host)}' -H 'Content-Type: #{content_type}' -H 'Accept: #{content_type}' -X PUT --data-binary @#{file.path} '#{uri}/v2/#{repo}/manifests/#{newtag}' -o -", capture: true).strip
38
+ raise result unless result.empty?
39
+ end
37
40
 
38
41
  if newrepo != repo
39
42
  if api == 'harbor'
data/lib/retag/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Retag
4
4
 
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
 
7
7
  end
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: retag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1.289789
4
+ version: 0.2.2.290087
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samoilenko Yuri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-14 00:00:00.000000000 Z
11
+ date: 2025-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler