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

Unified Diff: mojo/public/tools/gn/last_commit_timestamp.py

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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 | « mojo/public/tools/download_shell_binary.py ('k') | mojo/public/tools/gn/unzip.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/gn/last_commit_timestamp.py
diff --git a/mojo/public/tools/gn/last_commit_timestamp.py b/mojo/public/tools/gn/last_commit_timestamp.py
deleted file mode 100755
index 99c7e4567a41a2ef35973363c1265081d1c9bafb..0000000000000000000000000000000000000000
--- a/mojo/public/tools/gn/last_commit_timestamp.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Outputs the timestamp of the last commit in a Git repository."""
-
-import argparse
-import subprocess
-import sys
-
-def get_timestamp(directory):
- return subprocess.check_output(["git", "log", "-1", "--pretty=format:%ct"],
- cwd=directory)
-
-def main():
- parser = argparse.ArgumentParser(description="Prints the timestamp of the "
- "last commit in a git repository")
- parser.add_argument("--directory", nargs='?',
- help="Directory of the git repository", default=".")
- parser.add_argument("--output", nargs='?',
- help="Output file, or stdout if omitted")
- args = parser.parse_args()
-
- output_file = sys.stdout
- if args.output:
- output_file = open(args.output, 'w')
-
- with output_file:
- # Print without newline so GN can read it.
- output_file.write(get_timestamp(args.directory))
-
-if __name__ == '__main__':
- sys.exit(main())
-
« no previous file with comments | « mojo/public/tools/download_shell_binary.py ('k') | mojo/public/tools/gn/unzip.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698