vara 0.19.0 → 0.20.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 +3 -2
- data/lib/vara/product.rb +3 -2
- data/lib/vara/product_artifact_validator.rb +2 -0
- data/lib/vara/product_artifact_zipper.rb +8 -2
- 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: ea249c4314dc11fc544234a01f69b1c4750ea688
|
4
|
+
data.tar.gz: f303f4a246979d3bccd56d5699069fd1ccbfe05a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76c90a9297ff7948c50d9488f49d3e3e64d5422ef7002f7318c367691df7f8cb4cbb6c0b71b7a5ade0353868fbdffbea8dd2a993468db1fe4bea6e0280d96e1b
|
7
|
+
data.tar.gz: 0813df3e4aba5fe610eb4ec2db117ba92410ce05978cb271286de40ccede8bf8171a123ff6061792e3a4599e9046ea29bc67bd42e90bbd51a34df204ff471cc3
|
data/lib/vara/cli.rb
CHANGED
@@ -64,7 +64,7 @@ module Vara
|
|
64
64
|
desc 'zip-pivotal PRODUCT_DIR', 'Zips up the .pivotal product given that all artifacts are synced locally'
|
65
65
|
def zip_pivotal(product_dir)
|
66
66
|
require 'vara/product'
|
67
|
-
product = Vara::Product.new(File.expand_path(product_dir))
|
67
|
+
product = Vara::Product.new(File.expand_path(product_dir), options)
|
68
68
|
product.build
|
69
69
|
say("file #{product.path} has been created")
|
70
70
|
say("file #{product.bom_path} has been created")
|
@@ -73,6 +73,7 @@ module Vara
|
|
73
73
|
|
74
74
|
desc 'build-pivotal PRODUCT_DIR', 'Generate a .pivotal from a vara-flavored product repository'
|
75
75
|
option 'final', type: :boolean, desc: 'When true, $PRERELEASE_VERSION$ is removed instead of substituted'
|
76
|
+
option 'exclude_releases', type: :boolean, desc: 'When true, the empty files will be included instead of actual release binaries'
|
76
77
|
option 'version', type: :string, desc: 'When given, use the version as specified'
|
77
78
|
option 'external_releases', desc: 'Comma delimited paths to release metadata files to use when generating the .pivotal'
|
78
79
|
option 'cycle', default: 'alpha'
|
@@ -80,7 +81,7 @@ module Vara
|
|
80
81
|
metadata_path = build_metadata(product_dir)
|
81
82
|
build_migrations(product_dir)
|
82
83
|
lint(metadata_path)
|
83
|
-
download_artifacts(metadata_path)
|
84
|
+
download_artifacts(metadata_path) unless options[:exclude_releases]
|
84
85
|
zip_pivotal(product_dir)
|
85
86
|
end
|
86
87
|
end
|
data/lib/vara/product.rb
CHANGED
@@ -12,8 +12,9 @@ module Vara
|
|
12
12
|
|
13
13
|
attr_reader :base_dir
|
14
14
|
|
15
|
-
def initialize(base_dir)
|
15
|
+
def initialize(base_dir, options = {})
|
16
16
|
@base_dir = base_dir
|
17
|
+
@options = options
|
17
18
|
end
|
18
19
|
|
19
20
|
def metadata_file
|
@@ -25,7 +26,7 @@ module Vara
|
|
25
26
|
fail 'binaries.yml includes both stemcell and stemcell criteria keys'
|
26
27
|
end
|
27
28
|
|
28
|
-
ProductArtifactZipper.new(path, ProductContents.from_metadata_path(metadata_file)).zip!
|
29
|
+
ProductArtifactZipper.new(path, ProductContents.from_metadata_path(metadata_file), @options).zip!
|
29
30
|
|
30
31
|
MD5Creator.md5(path)
|
31
32
|
|
@@ -6,9 +6,10 @@ module Vara
|
|
6
6
|
class ProductArtifactZipper
|
7
7
|
include Loggable
|
8
8
|
|
9
|
-
def initialize(artifact_path, product_contents)
|
9
|
+
def initialize(artifact_path, product_contents, options = {})
|
10
10
|
@artifact_path = artifact_path
|
11
11
|
@product_contents = product_contents
|
12
|
+
@options = options
|
12
13
|
end
|
13
14
|
|
14
15
|
def zip!
|
@@ -73,9 +74,14 @@ module Vara
|
|
73
74
|
FileUtils.mkdir('releases')
|
74
75
|
|
75
76
|
product_contents.release_paths.each do |release_path|
|
76
|
-
|
77
|
+
if @options[:exclude_releases]
|
78
|
+
FileUtils.touch("releases/#{File.basename(release_path)}")
|
79
|
+
else
|
80
|
+
FileUtils.cp(release_path, 'releases')
|
81
|
+
end
|
77
82
|
end
|
78
83
|
|
84
|
+
return if @options[:exclude_releases]
|
79
85
|
product_metadata.releases_metadata.each do |release_metadata|
|
80
86
|
ProductArtifactValidator.validate_file_checksum(
|
81
87
|
release_metadata,
|
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.20.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-03-10 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.4.5
|
208
|
+
rubygems_version: 2.4.5.1
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Vara starts with a product git repository that meets specific requirements.
|