build-labels 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/build-labels/builder.rb +5 -0
- data/lib/build-labels/command_line.rb +3 -3
- data/lib/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: 06b8cbfa043cb60a1bb85aa96efea7fde084b43905f96b8e633bc5ef8b989749
|
4
|
+
data.tar.gz: d0bcb7c85b7d1ca878573cb1a0ebe46807447f134d45df0b185b48ac84d18b38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e67b1a55324168da25860c0dd1d0792670f839b0326f98c9861e39f9992e2cad47a31f1a429e211c8ac7660940b93a6d9a84be430b3fca4f86226e6ef28f8e81
|
7
|
+
data.tar.gz: 6637903d8537f8a02be3b2abad7a42685958cb6633048d245572cd9bef00069acb929475193b36c733322269b1d160527a119ae0cd1bed4b024c550c926863a8
|
data/lib/build-labels/builder.rb
CHANGED
@@ -50,6 +50,11 @@ module BuildLabels
|
|
50
50
|
compose['services'].each do |name, service|
|
51
51
|
next unless service['build']
|
52
52
|
service['build']['labels'] ||= []
|
53
|
+
|
54
|
+
if service['build'].class == String
|
55
|
+
service['build'] = { 'context' => service['build'] }
|
56
|
+
end
|
57
|
+
|
53
58
|
@namespaces.each do |ns, values|
|
54
59
|
values.each_pair do |k,v|
|
55
60
|
service['build']['labels'] << "#{ns}.#{k}=#{v}" unless v.to_s.empty?
|
@@ -30,9 +30,9 @@ module BuildLabels
|
|
30
30
|
o.version = "#{BuildLabels::Builder::VERSION}"
|
31
31
|
|
32
32
|
usage = [
|
33
|
-
'build-labels docker-compose.yml',
|
34
|
-
'cat docker-compose.yml |
|
35
|
-
'build-labels < docker-compose.yml'
|
33
|
+
'build-labels -c docker-compose.yml gitlab',
|
34
|
+
'cat docker-compose.yml | build-labels gitlab',
|
35
|
+
'build-labels gitlab < docker-compose.yml'
|
36
36
|
]
|
37
37
|
o.banner = "Version: #{o.version}\nUsage:\n\t#{usage.join "\n\t"}"
|
38
38
|
o.separator ''
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-labels
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artyom B
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|