Index: Jenkins/Distribute
===================================================================
--- Jenkins/Distribute	(revision 9c4ad6765135d1f60bbe16f509310ae13a291780)
+++ Jenkins/Distribute	(revision 8fe6040014a1e5b96cdf274c80b6102975cefef6)
@@ -26,5 +26,5 @@
 		wrap([$class: 'TimestamperBuildWrapper']) {
 
-			final commit = prepare_build()
+			final (commit, build) = prepare_build()
 
 			node('x64') {
@@ -35,4 +35,6 @@
 
 				Tools.Checkout( commit )
+
+				final version = GetVersion( build )
 			}
 
@@ -74,17 +76,15 @@
 // Main compilation routines
 //===========================================================================================================
+def GetVersion(build) {
+	final pver = "sed 's/AC_INIT(\[cfa-cc\],\[\(.*\)\],\[cforall@plg.uwaterloo.ca\])/\1/;t;d' ${SrcDir} configure.ac"
+	final version = "${pver}.${build}"
 
+	echo "Package Version: ${pver}"
+	echo "Build   Version: ${build}"
+	echo "Long    Version: ${version}"
 
-//Compilation script is done here but environnement set-up and error handling is done in main loop
-// def checkout() {
-// 	build_stage('Checkout', true) {
-// 		//checkout the source code and clean the repo
-// 		final scmVars = checkout scm
-// 		Settings.GitNewRef = scmVars.GIT_COMMIT
-// 		Settings.GitOldRef = scmVars.GIT_PREVIOUS_COMMIT
+	return version
+}
 
-// 		echo GitLogMessage()
-// 	}
-// }
 
 //===========================================================================================================
@@ -107,4 +107,9 @@
 					defaultValue: '',  								\
 				],												\
+				[$class: 'StringParameterDefinition',						\
+					description: 'Build Number to put into the version',			\
+					name: 'Build',									\
+					defaultValue: '0',  								\
+				],												\
 			],
 		]])
@@ -121,5 +126,5 @@
 	echo "Distributing git commit ${ref}"
 
-	return params.GitRef
+	return [params.GitRef, params.Build]
 }
 
