summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-12-05 20:20:48 +0000
committerCarl Hetherington <cth@carlh.net>2012-12-05 20:20:48 +0000
commitd9c086704e8a23ac2360fd9c0ae1f8a5cd703086 (patch)
tree5a9ea2fb744b77013f3a55495730ee6373827721
parenta21cd26c3221dd07f8a364b232baafdb93665f95 (diff)
Release script tweaks.
-rwxr-xr-xrelease14
-rw-r--r--version-test.py6
-rw-r--r--version.py1
3 files changed, 12 insertions, 9 deletions
diff --git a/release b/release
index 4dae50d14..ff85cf5cf 100755
--- a/release
+++ b/release
@@ -30,7 +30,7 @@ def check_diff_with_user():
print 'Aborted'
sys.exit(1)
-if os.popen('git status -s').read() != '':
+if not args.debug and os.popen('git status -s').read() != '':
print '%s: uncommitted changes exist.' % sys.argv[0]
sys.exit(1)
@@ -55,13 +55,9 @@ check_diff_with_user()
command("git commit -a -m \"Bump version\"")
command("git tag -m \"v%s\" v%s" % (new_version, new_version))
-m = version.Version.bump_and_to_pre
-if args.beta:
- m = version.Version.to_pre
-version.rewrite_wscript(m)
-
-check_diff_with_user()
-
-command("git commit -a -m \"Bump version\"")
+if args.release:
+ version.rewrite_wscript(version.Version.bump_and_to_pre)
+ check_diff_with_user()
+ command("git commit -a -m \"Bump version\"")
command("cp DVD-o-matic*.exe dvdomatic-*.tar.bz2 /home/carl/public_html/carlh.net/software/dvdomatic")
diff --git a/version-test.py b/version-test.py
index d5352b55b..47b4159fc 100644
--- a/version-test.py
+++ b/version-test.py
@@ -44,3 +44,9 @@ assert(a.minor == 53)
assert(a.pre == False)
assert(a.beta == None)
assert(str(a) == "0.53")
+
+b = version.Version("1.42beta1")
+assert(b.major == 1)
+assert(b.minor == 42)
+assert(b.pre == False)
+assert(b.beta == 1)
diff --git a/version.py b/version.py
index 89be92398..5b16352e1 100644
--- a/version.py
+++ b/version.py
@@ -23,6 +23,7 @@ class Version:
b = s.find("beta")
if b != -1:
self.beta = int(s[b+4:])
+ s = s[0:b]
p = s.split('.')
self.major = int(p[0])