Permalink
Browse files

Remove 'In Development' from manifest with the version script.

  • Loading branch information...
1 parent a5aa446 commit 518333dc2b724164edbaf0bac2f155e208351a49 @JakeWharton JakeWharton committed Sep 13, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 update-manifest.py → update-version.py
@@ -2,8 +2,10 @@
import os
import re
+from datetime import date
repo = os.path.dirname(os.path.realpath(__file__))
+changelog = os.path.join(repo, 'CHANGELOG.md')
code = 'android:versionCode="%s"'
name = 'android:versionName="%s"'
@@ -12,6 +14,7 @@
new_code = None
new_name = None
+# Update manifest files
for dirpath, dirnames, filenames in os.walk(repo):
for filename in filenames:
if filename == 'AndroidManifest.xml':
@@ -27,3 +30,11 @@
contents = re.sub(in_name, name % new_name, contents)
with open(filepath, 'w') as f:
f.write(contents)
+
+# Update change log
+with open(changelog) as f:
+ contents = f.read()
+if 'In Development' in contents:
+ contents = contents.replace('In Development', date.today().strftime('%Y-%m-%d'))
+ with open(changelog, 'w') as f:
+ f.write(contents)

0 comments on commit 518333d

Please sign in to comment.