Index: packagerChrome.py |
diff --git a/packagerChrome.py b/packagerChrome.py |
index 42fff4d8d908559a8bb08a0591a7fbdfa6a1a1dd..22188772cdd8bab508563a59dd7a6f3c7a99fb7b 100644 |
--- a/packagerChrome.py |
+++ b/packagerChrome.py |
@@ -354,6 +354,14 @@ def add_devenv_requirements(files, metadata, params): |
) |
+def addRevisionFile(files): |
+ try: |
+ cmd = ['git', 'rev-parse', 'HEAD'] |
+ files['.revision'] = subprocess.check_output(cmd).strip() |
+ except subprocess.CalledProcessError: |
+ pass |
+ |
+ |
def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuild=False, keyFile=None, devenv=False): |
metadata = readMetadata(baseDir, type) |
version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum) |
@@ -392,6 +400,10 @@ def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil |
import_locales(params, files) |
files['manifest.json'] = createManifest(params, files) |
+ |
+ if not releaseBuild and not devenv: |
+ addRevisionFile(files) |
+ |
if type == 'chrome': |
fix_translations_for_chrome(files) |