From 8bbca684032b73886200f3588e5b5f72916c216e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 3 Oct 2010 15:58:33 -0400 Subject: [PATCH] Update build.py to automatically commit version.js. --- build.py | 11 +++++++++-- web_frontend/version.js | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index 651ffea..6576229 100755 --- a/build.py +++ b/build.py @@ -106,7 +106,7 @@ def Main(): shutil.copy(os.path.join(FE_PATH, resource), fe_resources) # Version - print '=== Marking Version ===' + print '=== Version Stamp ===' if os.path.exists(VERSION_FILE): gitcrement = subprocess.Popen([ 'gitcrement', 'next' ], stdout = subprocess.PIPE, cwd = ROOT) gitcrement.wait() @@ -125,8 +125,15 @@ def Main(): fd.close() print ' BUILD ' + build_stamp + ' @ ' + time_stamp if options.compile_fe: - shutil.copy(VERSION_FILE, string.replace(VERSION_FILE, '.proto', '')) + mfiles = subprocess.Popen([ 'git', 'ls-files', '-m' ], stdout = subprocess.PIPE, cwd = ROOT) + mfiles.wait() + versioned_stamp_file = string.replace(VERSION_FILE, '.proto', '') + shutil.copy(VERSION_FILE, versioned_stamp_file) print ' COPY version.js.proto -> version.js' + if not len(mfiles.stdout.readlines()): + subprocess.Popen([ 'git', 'commit', '--author=Armadillo Build Script ', + '-m', 'Stamp version.js @ ' + build_stamp + '.', versioned_stamp_file ], stdout = sys.stdout, + stderr = sys.stderr).wait() # Compile JS. print '=== Compiling Front End ===' diff --git a/web_frontend/version.js b/web_frontend/version.js index 54423f6..d71daeb 100644 --- a/web_frontend/version.js +++ b/web_frontend/version.js @@ -11,5 +11,5 @@ goog.provide('armadillo.Version'); armadillo.Version.MAJOR = 0; armadillo.Version.MINOR = 2; -armadillo.Version.BUILD = 9; -armadillo.Version.STAMP = 1286123718; +armadillo.Version.BUILD = 37; +armadillo.Version.STAMP = 1286135974; -- 2.22.5