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

Side by Side Diff: tools/milestone.py

Issue 1823753002: SkPDF: record milestone version in Producer string (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: include Created 4 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 | « tests/PDFMetadataAttributeTest.cpp ('k') | 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 # Copyright 2016 Google Inc.
3 #
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 import os
8 import sys
9
10 milestone_file = 'include/core/SkMilestone.h'
11
12 usage = '''
13 usage:
14 git fetch
15 git checkout -b change_milestone origin/master
16 python %s MILESTONE_NUMBER
17 git add %s
18 git commit -m "Update Skia milestone."
19 git cl land
20
21 '''
22 try:
23 milestone = int(sys.argv[1])
24 assert milestone > 0
25 except (IndexError, ValueError, AssertionError):
26 sys.stderr.write(usage % (sys.argv[0], milestone_file))
27 exit(1)
28
29 text = '''/*
30 * Copyright 2016 Google Inc.
31 *
32 * Use of this source code is governed by a BSD-style license that can be
33 * found in the LICENSE file.
34 */
35 #ifndef SK_MILESTONE
36 #define SK_MILESTONE %d
37 #endif
38 '''
39
40 os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))
41
42 with open(milestone_file, 'w') as o:
43 o.write(text % milestone)
44
45 with open(milestone_file, 'r') as f:
46 sys.stdout.write(f.read())
OLDNEW
« no previous file with comments | « tests/PDFMetadataAttributeTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698