build-labels 0.0.51 → 0.0.53

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: 1dd0ab3713ab953a545d5a6456db074b242748188266c59d36e13f8bb9321b98
4
- data.tar.gz: 1aa8398326b99a8c32c625844a27687e98f62c8c212fc5d55af76d60afed6899
3
+ metadata.gz: 0e46618a73c34421edbd12716763e784713c85674bc0803329505e43e2f5de24
4
+ data.tar.gz: 3d8833f0d796dbebbc07964f3a0bb7397c61504c67b63aab9aa62992f9f2f8f1
5
5
  SHA512:
6
- metadata.gz: 0aeb2d54fce775def42049f7187d576450532e6330a57b3873f817cc9ed557ad61b280ab64d0b0db449698ee2a0effe22076c096f86503e883076ef6f442eedd
7
- data.tar.gz: f93a653b6e36b290eef8af7365a3f0f5fc0e9d5f3c13b12127f7d960f43b858e3a729e240cdf266a49bf94f8b3e4a482d3cff7f2ee44732f5cc2ad485c3864a8
6
+ metadata.gz: 13befff51f219c4d4de7211c6265f538768eba2a406d9a676b53bf70da642b58e51f1adb4e06022cded5a78021d53fd044287602d7e7e5e479ca8c6bb0ddc146
7
+ data.tar.gz: dc653dd45d9d49f6ceeb205a23f0c6d55cbf4836cb390c9c903bc9d51d0cc0359885350fc463b910b9e064cb4ca49b7f0cfc174c4ef02e9d11afed8bb9c0c460
@@ -9,6 +9,7 @@ BuildLabels::CommandLine::COMMANDS[:set_version] = Class.new do
9
9
 
10
10
  compose['services'].each do |_name, svc|
11
11
  next unless svc['build']
12
+
12
13
  unless svc['build']['tags']
13
14
  svc['build']['tags'] = [svc['image']]
14
15
  end
@@ -28,7 +29,8 @@ BuildLabels::CommandLine::COMMANDS[:set_version] = Class.new do
28
29
  exit 1
29
30
  end
30
31
 
31
- full_version = "#{current_version}.#{ENV['CI_PIPELINE_IID']}"
32
+ build_id = ENV['GITHUB_RUN_NUMBER'] || ENV['CI_PIPELINE_IID']
33
+ full_version = "#{current_version}.#{build_id}"
32
34
  builder.oc.version = full_version
33
35
 
34
36
  svc['build']['tags'] = svc['build']['tags'].map do |t|
@@ -49,6 +51,10 @@ BuildLabels::CommandLine::COMMANDS[:set_version] = Class.new do
49
51
  end
50
52
  end
51
53
 
54
+ # add latest tag
55
+ if svc['image'].split(':').size == 1
56
+ svc['build']['tags'] += "#{svc['image']}:latest"
57
+ end
52
58
  end
53
59
  end
54
60
 
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module BuildLabels
2
2
  class Builder
3
- VERSION = '0.0.51'
3
+ VERSION = '0.0.53'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-labels
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.51
4
+ version: 0.0.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artyom B