vara 0.22.0 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vara/cli.rb +16 -0
- data/lib/vara/product.rb +8 -0
- data/lib/vara/product_metadata.rb +3 -2
- data/lib/vara/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9927b86468067f7e7cf07db35142614bdfcacf74
|
4
|
+
data.tar.gz: 5b13e20f8a58408252c97c5a786d4af04140d894
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d954c1ebc96785c88c6fc440adc169454a5f8d4397d8ad3cfcacdba8e2f28f6798f78cbd58ac2864717cb97bd349cdc9d2e9ca418f813f7583c04700fec1a0ca
|
7
|
+
data.tar.gz: 61b7f161391c69ef1c17b404d24d746a09f052a61daa5fef5cfe5aeecfa89280292e4f5f7496934c5e13b1ee90f83bd34e17f1a042f6044d4c779071cdbf3366
|
data/lib/vara/cli.rb
CHANGED
@@ -84,6 +84,22 @@ module Vara
|
|
84
84
|
download_artifacts(metadata_path) unless options[:exclude_releases]
|
85
85
|
zip_pivotal(product_dir)
|
86
86
|
end
|
87
|
+
|
88
|
+
desc 'finalize-pivotal PIVOTAL_FILE_PATH VERSION', 'Update the version of a pivotal file'
|
89
|
+
def finalize_pivotal(pivotal_file_path, version)
|
90
|
+
require 'vara/product'
|
91
|
+
Dir.mktmpdir do |temp_dir|
|
92
|
+
FileUtils.cd(temp_dir) do
|
93
|
+
`unzip #{pivotal_file_path} -d .`
|
94
|
+
output_dir = File.dirname(pivotal_file_path)
|
95
|
+
product = Vara::Product.new(temp_dir)
|
96
|
+
product.update_product_version(version)
|
97
|
+
product.build
|
98
|
+
file_path = product.path
|
99
|
+
FileUtils.cp(file_path, output_dir)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
87
103
|
end
|
88
104
|
end
|
89
105
|
|
data/lib/vara/product.rb
CHANGED
@@ -64,6 +64,14 @@ module Vara
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
+
def update_product_version(new_version)
|
68
|
+
metadata_hash = metadata.hash
|
69
|
+
metadata_hash['product_version'] = new_version
|
70
|
+
File.open(metadata_file, 'w') do |out|
|
71
|
+
YAML.dump(metadata_hash, out)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
67
75
|
private
|
68
76
|
|
69
77
|
def metadata
|
@@ -6,6 +6,9 @@ require 'vara/metadata/compiled_packages'
|
|
6
6
|
module Vara
|
7
7
|
# "Struct" representing the information in metadata/<product_name>.yml
|
8
8
|
class ProductMetadata
|
9
|
+
|
10
|
+
attr_reader :hash
|
11
|
+
|
9
12
|
# Build a ProductMetadata from a metadata.yml on disk
|
10
13
|
# @param metadata_path Path to the product metadata file on disk
|
11
14
|
# @return [Vara::ProductMetadata]
|
@@ -85,8 +88,6 @@ module Vara
|
|
85
88
|
|
86
89
|
private
|
87
90
|
|
88
|
-
attr_reader :hash
|
89
|
-
|
90
91
|
# @return [Vara::Metadata::Release]
|
91
92
|
def release_metadata(release_hash)
|
92
93
|
release = release_hash
|
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.23.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-
|
11
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|