buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1553631 - in /buildr/trunk: CHANGELOG addon/buildr/git_auto_version.rb
Date Fri, 27 Dec 2013 06:27:08 GMT
Author: donaldp
Date: Fri Dec 27 06:27:07 2013
New Revision: 1553631

URL: http://svn.apache.org/r1553631
Log:
Support prefixing the version generated by the gwt_auto_version addon with the environment
variable "VERSION_PREFIX".

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/addon/buildr/git_auto_version.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1553631&r1=1553630&r2=1553631&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Fri Dec 27 06:27:07 2013
@@ -1,4 +1,7 @@
 1.4.16 (Pending)
+* Change: Support prefixing the version generated by the
+          gwt_auto_version addon with the environment
+          variable "VERSION_PREFIX".
 * Fixed:  Support overriding the GWT version used by the GWT addon.
 * Fixed:  Fix problem when the :dependencies option was not
           passed to the GWT addon.

Modified: buildr/trunk/addon/buildr/git_auto_version.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/git_auto_version.rb?rev=1553631&r1=1553630&r2=1553631&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/git_auto_version.rb (original)
+++ buildr/trunk/addon/buildr/git_auto_version.rb Fri Dec 27 06:27:07 2013
@@ -21,7 +21,8 @@ module Buildr
       before_define do |project|
         unless project.version
           version_suffix = ENV['BUILD_NUMBER'] ? "-#{ENV['BUILD_NUMBER']}" : ''
-          project.version = `git describe --tags --always`.strip + version_suffix
+          version_prefix = ENV['VERSION_PREFIX'] ? "#{ENV['VERSION_PREFIX']}-" : ''
+          project.version = version_prefix + `git describe --tags --always`.strip + version_suffix
         end
       end
     end
@@ -30,4 +31,4 @@ end
 
 class Buildr::Project
   include Buildr::GitAutoVersion::ProjectExtension
-end
+end



Mime
View raw message