Permalink
Browse files

Controlling version via the VERSION file, allowing us to publish prer…

…elease packages from CI
  • Loading branch information...
1 parent f9865db commit e333fb38e5461e81ae999f3053dda88eb4783ad6 @agross agross committed Mar 28, 2012
Showing with 11 additions and 6 deletions.
  1. +1 −0 VERSION
  2. +1 −1 mspec.nuspec.template
  3. +9 −5 rakefile.rb
View
@@ -0,0 +1 @@
+0.5.7
View
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>@configatron.project@</id>
- <version>@configatron.version.compatible@</version>
+ <version>@configatron.version.package@</version>
<title>@configatron.project@</title>
<authors>Aaron Jensen, Alexander Groß, et al.</authors>
<owners>Alexander Groß</owners>
View
@@ -13,12 +13,13 @@
build_config = {
:build => {
- :base => "0.5",
+ :base => File.read('VERSION'),
:number => ENV['BUILD_NUMBER'],
:sha => ENV['BUILD_VCS_NUMBER'] || 'no SHA',
+ :prerelease => ENV.include?('PRERELEASE')
},
:target => target,
- :sign_assembly => (ENV['SIGN_ASSEMBLY'] =~ /true/i and true or false),
+ :sign_assembly => ENV.include?('SIGN_ASSEMBLY'),
:out_dir => "Build/#{target}/",
:nunit_framework => "net-3.5",
:mspec_options => (["--teamcity"] if ENV.include?('TEAMCITY_PROJECT_NAME')) || []
@@ -31,16 +32,19 @@
"#{project}#{'-Signed' if configatron.sign_assembly}"
end
configatron.nuget.package = Configatron::Delayed.new do
- "Distribution/#{configatron.project}.#{configatron.version.compatible}.nupkg"
+ "Distribution/#{configatron.project}.#{configatron.version.package}.nupkg"
end
configatron.zip.package = Configatron::Delayed.new do
"Distribution/#{configatron.project}-#{configatron.target}.zip"
end
configatron.version.full = Configatron::Delayed.new do
- "#{configatron.build.base}.#{configatron.build.number || '0'}-#{configatron.build.sha[0..6]}"
+ "#{configatron.build.base}#{'-beta' + configatron.build.number if configatron.build.prerelease}-#{configatron.build.sha[0..6]}"
+ end
+ configatron.version.package = Configatron::Delayed.new do
+ "#{configatron.build.base}#{'-beta' + configatron.build.number if configatron.build.prerelease}"
end
configatron.version.compatible = Configatron::Delayed.new do
- "#{configatron.build.base}.#{configatron.build.number || '0'}.0"
+ "#{configatron.build.base}.0"
end
configatron.configure_from_hash build_config

0 comments on commit e333fb3

Please sign in to comment.