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

Unified Diff: tools/utils.py

Issue 1359293002: Move VERSION file location into top level variable (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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: tools/utils.py
diff --git a/tools/utils.py b/tools/utils.py
index 7379d6af8ec592f790f58521262bbec69d08720f..7b203aac978e948d1876e7b4d252a16d2b7b4d32 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -240,6 +240,7 @@ ARCH_FAMILY = {
ARCH_GUESS = GuessArchitecture()
BASE_DIR = os.path.abspath(os.path.join(os.curdir, '..'))
DART_DIR = os.path.abspath(os.path.join(__file__, '..', '..'))
+VERSION_FILE = os.path.join(DART_DIR, 'tools', 'VERSION')
def GetBuildbotGSUtilPath():
gsutil = '/b/build/scripts/slave/gsutil'
@@ -341,13 +342,12 @@ def ReadVersionFile():
return match.group(1)
return None
- version_file = os.path.join(DART_DIR, 'tools', 'VERSION')
try:
- fd = open(version_file)
+ fd = open(VERSION_FILE)
content = fd.read()
fd.close()
except:
- print "Warning: Couldn't read VERSION file (%s)" % version_file
+ print "Warning: Couldn't read VERSION file (%s)" % VERSION_FILE
return None
channel = match_against('^CHANNEL ([A-Za-z0-9]+)$', content)
@@ -361,7 +361,7 @@ def ReadVersionFile():
return Version(
channel, major, minor, patch, prerelease, prerelease_patch)
else:
- print "Warning: VERSION file (%s) has wrong format" % version_file
+ print "Warning: VERSION file (%s) has wrong format" % VERSION_FILE
return None
« 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