Read Version from File

Version 1 by Robin Shen
on Dec 04, 2014 05:19.


 
compared with
Current by Robin Shen
on Aug 15, 2016 22:24.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 2 changes. View first change.

 h1. Situation
 Control build version with a text file stored in SCM.
  
 h1. Demonstration
 # Run the [demo configuration|https://demo.pmease.com/overview/118].
 # Navigate to [workspace area of the configuration|https://demo.pmease.com/workspace/118] and check content of version.txt. Version of the newly generated build will remain the same as content of this file.
  
 h1. Resolution
 Check [general setting of the demo configuration|https://demo.pmease.com/settings/118/general], the next version is defined as below:\
  Check [general setting of the demo configuration|https://demo.pmease.com/settings/118/general], the next version is defined as below:
 {code}
 $\{groovy:repositories.get("repo").sourceViewSupport.readSourceAsString("/demos/componentA/trunk/version.txt")\}
  ${groovy:repositories.get("repo").sourceViewSupport.readSourceAsString("/demos/componentA/trunk/version.txt")}
 {code}
  
 This tells QuickBuild to read content of file _/demos/componentA/trunk/version.txt_ from SCM repository and return it as version of next build.