vara 0.17.3 → 0.18.0
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/vara/cli.rb +1 -1
- data/lib/vara/content_migrations_processor.rb +5 -1
- data/lib/vara/product_artifact_zipper.rb +10 -3
- data/lib/vara/product_contents.rb +12 -0
- data/lib/vara/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8620fbfdfd18af314cc45d3e02e44088523d3e8b
|
4
|
+
data.tar.gz: fe6a19b66417313cf0473d477a15b96d363805c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c723d85456760a5171762141d9ca7d9107af884c1a97cbac7344a6ae4308ff254c9e2b619bbf60fe0c8634b26fa1a05fa57d36e4c621acf1116eedf3576cba34
|
7
|
+
data.tar.gz: 46767ec90d9b672340e8ae0ba3e8bf0ec46969f41835938eb9ca1bdae9ec74289e1993cfc4029dda5433c661e229617d1f73b3587a79cdabacbd2d4c93f6a27f
|
data/lib/vara/cli.rb
CHANGED
@@ -43,7 +43,7 @@ module Vara
|
|
43
43
|
versioner = Vara::StaticVersioner.new(File.expand_path(product_dir), options.fetch('version'))
|
44
44
|
end
|
45
45
|
content_migrations_path = Vara::ContentMigrationsProcessor.new(File.expand_path(product_dir), versioner).process
|
46
|
-
say("#{content_migrations_path} has been created")
|
46
|
+
say("#{content_migrations_path} has been created") unless content_migrations_path.nil?
|
47
47
|
content_migrations_path
|
48
48
|
end
|
49
49
|
|
@@ -16,6 +16,7 @@ module Vara
|
|
16
16
|
# into content_migrations/migrations.yml, expanding placeholders as necessary.
|
17
17
|
# @return [String] path to the generated content migration file
|
18
18
|
def process
|
19
|
+
return unless File.exist?(parts_dir)
|
19
20
|
content_migrations = load_content_migrations
|
20
21
|
processed = versioner.update_content_migrations(content_migrations)
|
21
22
|
save_content_migrations(processed)
|
@@ -26,7 +27,6 @@ module Vara
|
|
26
27
|
attr_reader :product_dir, :versioner
|
27
28
|
|
28
29
|
def load_content_migrations
|
29
|
-
parts_dir = File.join(product_dir, 'content_migrations_parts')
|
30
30
|
base_path = File.join(parts_dir, 'base.yml')
|
31
31
|
content_migrations = YAML.load_file(base_path) || {}
|
32
32
|
log.info("Composing content migrations: loaded #{base_path}")
|
@@ -40,6 +40,10 @@ module Vara
|
|
40
40
|
content_migrations
|
41
41
|
end
|
42
42
|
|
43
|
+
def parts_dir
|
44
|
+
File.join(product_dir, 'content_migrations_parts')
|
45
|
+
end
|
46
|
+
|
43
47
|
def save_content_migrations(processed_hash)
|
44
48
|
out_path = File.join(product_dir, 'content_migrations', 'migrations.yml')
|
45
49
|
|
@@ -7,7 +7,7 @@ module Vara
|
|
7
7
|
include Loggable
|
8
8
|
|
9
9
|
def initialize(artifact_path, product_contents)
|
10
|
-
@artifact_path
|
10
|
+
@artifact_path = artifact_path
|
11
11
|
@product_contents = product_contents
|
12
12
|
end
|
13
13
|
|
@@ -46,8 +46,15 @@ module Vara
|
|
46
46
|
copy_and_validate_compiled_packages(product_metadata)
|
47
47
|
end
|
48
48
|
|
49
|
-
|
50
|
-
|
49
|
+
if product_contents.content_migrations_exist?
|
50
|
+
FileUtils.mkdir('content_migrations')
|
51
|
+
FileUtils.cp(product_contents.content_migrations_path, 'content_migrations')
|
52
|
+
end
|
53
|
+
|
54
|
+
if product_contents.migrations_exist?
|
55
|
+
FileUtils.mkdir('migrations')
|
56
|
+
FileUtils.cp_r(product_contents.migrations_path, '.')
|
57
|
+
end
|
51
58
|
|
52
59
|
FileUtils.mkdir('metadata')
|
53
60
|
FileUtils.cp(product_contents.metadata_path, 'metadata')
|
@@ -24,6 +24,18 @@ module Vara
|
|
24
24
|
paths.first
|
25
25
|
end
|
26
26
|
|
27
|
+
def content_migrations_exist?
|
28
|
+
File.exist?(File.expand_path(File.join(root_path, 'content_migrations')))
|
29
|
+
end
|
30
|
+
|
31
|
+
def migrations_path
|
32
|
+
File.expand_path(File.join(root_path, 'migrations'))
|
33
|
+
end
|
34
|
+
|
35
|
+
def migrations_exist?
|
36
|
+
File.exist?(File.expand_path(File.join(root_path, 'migrations')))
|
37
|
+
end
|
38
|
+
|
27
39
|
# @return [<String>] The paths to the release tarballs on disk
|
28
40
|
def release_paths
|
29
41
|
product_metadata.releases_metadata.map { |release_metadata| File.join(root_path, 'releases', release_metadata.basename) }
|
data/lib/vara/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CF Release Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
207
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.
|
208
|
+
rubygems_version: 2.4.5
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Vara starts with a product git repository that meets specific requirements.
|