Repository: incubator-reef
Updated Branches:
  refs/heads/master eeafba31c -> 8f62c90be


[REEF-352]  Modify build script to form a proper snapshot number

We would like to use snapshot number starting from 00-99, this would
allow the NuGet version numbers to increase sequentially. As current
script use integer for the snapshot number, the leading 0 got lost.

This PR

 * Updates the build script to form a two digits snapshot number
 * Updates the snapshot number to 02 for next push

JIRA:
  [REEF-352](https://issues.apache.org/jira/browse/REEF-352)

Pull Request:
  This closes #203


Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/8f62c90b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/8f62c90b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/8f62c90b

Branch: refs/heads/master
Commit: 8f62c90be4cef1502a722d3142c022b5f7301d6f
Parents: eeafba3
Author: Julia Wang <[email protected]>
Authored: Thu Jun 4 14:41:31 2015 -0700
Committer: Markus Weimer <[email protected]>
Committed: Fri Jun 5 11:32:18 2015 +1000

----------------------------------------------------------------------
 lang/cs/build.props | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8f62c90b/lang/cs/build.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.props b/lang/cs/build.props
index c85ab29..da5ea00 100644
--- a/lang/cs/build.props
+++ b/lang/cs/build.props
@@ -54,7 +54,7 @@ under the License.
   <PropertyGroup>
     <RemoveIncubating>true</RemoveIncubating>
     <IsSnapshot>true</IsSnapshot>
-    <SnapshotNumber>0</SnapshotNumber>
+    <SnapshotNumber>02</SnapshotNumber>
     <PushPackages>false</PushPackages>
     <NuGetRepository>https://www.nuget.org</NuGetRepository>
   </PropertyGroup>
@@ -102,7 +102,8 @@ under the License.
             .Where(x => x.Name.ToString().Contains("version"))
             .FirstOrDefault().Value;
           var shortVer = $(RemoveIncubating) ? 
Version.Replace("-incubating","") : Version ;
-          NugetVersion = $(IsSnapshot) ? shortVer + "-" + $(SnapshotNumber) : 
shortVer.Replace("-SNAPSHOT","");
+          var snapshortNumberAsString = ($(SnapshotNumber) >= 0 && 
$(SnapshotNumber) <=9) ? "0" + $(SnapshotNumber) : $(SnapshotNumber).ToString();
+          NugetVersion = $(IsSnapshot) ? shortVer + "-" + 
snapshortNumberAsString : shortVer.Replace("-SNAPSHOT","");
         ]]>
       </Code>
     </Task>

Reply via email to