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

Unified Diff: dart/tools/publish_barback.py

Issue 85553002: Add CHANNEL to tools/VERSION (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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
Index: dart/tools/publish_barback.py
diff --git a/dart/tools/publish_barback.py b/dart/tools/publish_barback.py
index 58ca64a2449dcf0a181cca0d3f2bdca8f900e1ac..a4b9c3db79d664ff7bf74125ecfbfed02318628a 100755
--- a/dart/tools/publish_barback.py
+++ b/dart/tools/publish_barback.py
@@ -20,31 +20,22 @@
import os
import os.path
-import re
import shutil
import sys
import subprocess
import tempfile
-def ReadVersion(file, field):
- for line in open(file).read().split('\n'):
- [k, v] = re.split('\s+', line)
- if field == k:
- return int(v)
+import utils
def Main(argv):
HOME = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
BARBACK = os.path.join(HOME, 'pkg', 'barback')
- versionFile = os.path.join(HOME, 'tools', 'VERSION')
- major = ReadVersion(versionFile, 'MAJOR')
- minor = ReadVersion(versionFile, 'MINOR')
- build = ReadVersion(versionFile, 'BUILD')
- patch = ReadVersion(versionFile, 'PATCH')
+ (channel, major, minor, build, patch) = utils.ReadVersionFile()
# The bleeding_edge branch has a fixed version number of 0.1.x.y. Don't allow
# users to publish packages from there.
- if major == 0 and minor <= 1:
+ if (major == 0 and minor <= 1) or channel == 'be':
Bob Nystrom 2013/11/25 17:41:59 If channel will reliably be set, you can just remo
kustermann 2013/11/26 14:17:32 I thought about removing it, but it doesn't hurt i
print 'Error: Do not run this script from a bleeding_edge checkout.'
return -1

Powered by Google App Engine
This is Rietveld 408576698