summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJF Bastien <jfb@chromium.org>2016-01-17 08:34:52 -0800
committerJF Bastien <jfb@chromium.org>2016-01-17 08:34:52 -0800
commitc45e278c53d44e823b7814a454f7bbb921f6cd8b (patch)
treeb968af4eecef50771c1de1167210bedf3a7965af
parent74b3798652f65fbbbe94b9aac2cb4f0fb8ccea09 (diff)
downloadbinaryen-c45e278c53d44e823b7814a454f7bbb921f6cd8b.tar.gz
binaryen-c45e278c53d44e823b7814a454f7bbb921f6cd8b.tar.bz2
binaryen-c45e278c53d44e823b7814a454f7bbb921f6cd8b.zip
Allow updating to specific build ID
Even if the downloaded content is the same. #112 adds usage of the binary tarfile, which is separate from the torture tests.
-rwxr-xr-xupdate.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/update.py b/update.py
index c0d14411c..7b949d895 100755
--- a/update.py
+++ b/update.py
@@ -32,19 +32,20 @@ def write_revision(revision):
f.write(revision)
-def run(force_latest, override_hash):
+def run(force_latest, override_build):
subprocess.check_call(['git', 'submodule', 'sync', '--quiet'])
subprocess.check_call(['git', 'submodule', 'init', '--quiet'])
subprocess.check_call(['git', 'submodule', 'update', '--quiet'])
subprocess.check_call(['git', 'submodule', 'foreach',
'git', 'pull', 'origin', 'master', '--quiet'])
updates = 0
- revision = (override_hash if override_hash else
+ revision = (override_build if override_build else
scripts.storage.download_revision(force_latest=force_latest))
downloaded = scripts.storage.download_tar(TORTURE_TAR, BASE_DIR, revision)
updates += scripts.support.untar(downloaded, BASE_DIR)
- if updates:
- # Only update revision if the files it downloaded are different.
+ if updates or override_build:
+ # Only update revision if the files it downloaded are different, or if
+ # overriding the build ID.
print 'Updating revision to', revision
write_revision(revision)
@@ -55,12 +56,12 @@ def getargs():
description='Update the repository dependencies.')
parser.add_argument('--force-latest', action='store_true',
help='Sync to latest waterfall build, not lkgr')
- parser.add_argument('--override-hash', type=str, default=None,
- help='Sync to specific hash from waterfall build')
+ parser.add_argument('--override-build', type=str, default=None,
+ help='Sync to specific build ID from waterfall build')
return parser.parse_args()
if __name__ == '__main__':
args = getargs()
sys.exit(run(force_latest=args.force_latest,
- override_hash=args.override_hash))
+ override_build=args.override_build))