Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: sky/tools/deploy_sdk.py

Issue 1088223003: Improve commit message generation for deploy_sdk. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Update per review comments Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/deploy_sdk.py
diff --git a/sky/tools/deploy_sdk.py b/sky/tools/deploy_sdk.py
index c5b481c7d9bc001423504e4bfc074465db52f826..e4bf71adb95670e2c2060c8fc042238196ead9f7 100755
--- a/sky/tools/deploy_sdk.py
+++ b/sky/tools/deploy_sdk.py
@@ -204,11 +204,18 @@ def main():
if should_commit:
# Kinda a hack to make a prettier build dir for the commit:
- rel_build_dir = os.path.join(os.path.split(build_dir)[-2:])
+ script_path = os.path.relpath(os.path.abspath(__file__), SRC_ROOT)
+ rel_build_dir = os.path.relpath(build_dir, SRC_ROOT)
+ revision = git_revision()
+ commit_url = "https://github.com/domokit/mojo/commit/%s" % revision
+ pattern = """Autogenerated from %s
+Using %s and build output from %s.
+"""
+ commit_message = pattern % (commit_url, script_path, rel_build_dir)
subprocess.check_call(['git', 'add', '.'], cwd=sdk_root)
subprocess.check_call([
'git', 'commit',
- '-m', '%s from %s' % (rel_build_dir, git_revision())
+ '-m', commit_message
], cwd=sdk_root)
time_delta = datetime.now() - start_time
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698