mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Improve commit message generation for deploy_sdk.
Hopefully this will make it slightly more clear that the sky_sdk repository is not actually a stand-alone repository, but rather generated by a script. R=ianh@google.com Review URL: https://codereview.chromium.org/1088223003
This commit is contained in:
parent
2c9ddfc8ff
commit
465c66d337
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user