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

Side by Side Diff: tools/get_uploaded_hashes.py

Issue 1062873002: Remove get_uploaded hashes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright 2015 Google Inc.
4 #
5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file.
7
8
9 import os
10 import subprocess
11 import sys
12
13 sys.path.insert(0, os.path.join('common', 'py', 'utils'))
14 import gs_utils
15
16
17 def get_uploaded_hashes(gs_bucket, gs_dir):
18 _, files = gs_utils.GSUtils().list_bucket_contents(gs_bucket, subdir=gs_dir)
19 hashes = []
20 for line in files:
21 hashes.append(os.path.basename(line).split('.')[0])
22 return hashes
23
24
25 def main(gs_bucket, gs_dir, output_file):
26 hashes = get_uploaded_hashes(gs_bucket, gs_dir)
27 with open(output_file, 'w') as f:
28 for h in hashes:
29 f.write(h + '\n')
30
31
32 if __name__ == '__main__':
33 if len(sys.argv) != 4:
34 print >> sys.stderr , ('Usage: %s <gs_bucket> <gs_subdir> <output_file>' %
35 sys.argv[0])
36 sys.exit(1)
37 main(*sys.argv[1:])
OLDNEW
« 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