Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[BGBUILD-296] BG should refer to version and release when building ne…

…w appliances
  • Loading branch information...
commit 5bfa9e4883625ed283469a1da6c1a97aac073ec4 1 parent 03061b8
@goldmann goldmann authored
View
1  CHANGELOG
@@ -1,6 +1,7 @@
v0.3.6
* [BGBUILD-295] Remove arbitrary 4 CPU limit
+* [BGBUILD-296] BG should refer to version and release when building new appliances
v0.3.5
View
1  Manifest
@@ -26,6 +26,7 @@ spec/helpers/appliance-definition-helper-spec.rb
spec/helpers/appliance-transformation-helper-spec.rb
spec/helpers/exec-helper-spec.rb
spec/helpers/log-helper-spec.rb
+spec/models/appliance-config-spec.rb
spec/models/config-spec.rb
spec/rspec/ls/one
spec/rspec/ls/two
View
3  lib/boxgrinder-core/models/appliance-config.rb
@@ -84,8 +84,9 @@ def initialize_paths
@path = OpenCascade.new
@path.os = "#{@os.name}/#{@os.version}"
+ @path.version = "#{@version}.#{@release}"
@path.main = "#{@hardware.arch}/#{@path.os}"
- @path.appliance = "appliances/#{@path.main}/#{@name}"
+ @path.appliance = "appliances/#{@path.main}/#{@name}/#{@path.version}"
@path.build = "build/#{@path.appliance}"
self
View
1  rubygem-boxgrinder-core.spec
@@ -79,6 +79,7 @@ popd
* Tue Aug 23 2011 Marek Goldmann <mgoldman@redhat.com> - 0.3.6-1
- Upstream release: 0.3.6
- [BGBUILD-295] Remove arbitrary 4 CPU limit
+- [BGBUILD-296] BG should refer to version and release when building new appliances
* Wed Jul 13 2011 Marek Goldmann <mgoldman@redhat.com> - 0.3.5-1
- Upstream release: 0.3.5
View
37 spec/models/appliance-config-spec.rb
@@ -0,0 +1,37 @@
+#
+# Copyright 2010 Red Hat, Inc.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 3 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+require 'rubygems'
+require 'rspec'
+require 'boxgrinder-core/models/appliance-config'
+
+module BoxGrinder
+ describe ApplianceConfig do
+ it "should generate valid build path including version and release" do
+ appliance_config = ApplianceConfig.new
+ appliance_config.os.name = 'fedora'
+ appliance_config.os.version = '15'
+ appliance_config.hardware.arch = 'x86_64'
+ appliance_config.name = 'testing'
+
+ appliance_config.initialize_paths
+
+ appliance_config.path.build.should == 'build/appliances/x86_64/fedora/15/testing/1.0'
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.