Permalink
Browse files

remove .md references from Makefile.py; leave a TODO

  • Loading branch information...
1 parent 79f0cb8 commit 43812022adc51ea269f7bfd68c1d66e9d307d367 Sridhar Ratnakumar committed Jan 26, 2011
Showing with 7 additions and 4 deletions.
  1. +7 −4 Makefile.py
View
@@ -41,6 +41,8 @@ class cut_a_release(Task):
proj_name = "appdirs"
version_py_path = "lib/appdirs.py"
version_module = "appdirs"
+
+ # XXX: this needs to be changed from .md to .rst format
_changes_parser = re.compile(r'^## %s (?P<ver>[\d\.abc]+)'
r'(?P<nyr>\s+\(not yet released\))?'
r'(?P<body>.*?)(?=^##|\Z)' % proj_name, re.M | re.S)
@@ -62,18 +64,19 @@ def make(self):
self.log.info("cutting a %s release", version)
# Checks: Ensure there is a section in changes for this version.
- changes_path = join(self.dir, "CHANGES.md")
+ changes_path = join(self.dir, "CHANGES.rst")
changes_txt = changes_txt_before = codecs.open(changes_path, 'r', 'utf-8').read()
+ raise NotImplementedError('_changes_parser: change me to .rst')
changes_sections = self._changes_parser.findall(changes_txt)
top_ver = changes_sections[0][0]
if top_ver != version:
- raise MkError("top section in `CHANGES.md' is for "
+ raise MkError("top section in `CHANGES.rst' is for "
"version %r, expected version %r: aborting"
% (top_ver, version))
top_nyr = changes_sections[0][1]
if not top_nyr:
answer = query_yes_no("\n* * *\n"
- "The top section in `CHANGES.md' doesn't have the expected\n"
+ "The top section in `CHANGES.rst' doesn't have the expected\n"
"'(not yet released)' marker. Has this been released already?",
default="yes")
if answer != "no":
@@ -88,7 +91,7 @@ def make(self):
# Commits to prepare release.
changes_txt = changes_txt.replace(" (not yet released)", "", 1)
if not DRY_RUN and changes_txt != changes_txt_before:
- self.log.info("prepare `CHANGES.md' for release")
+ self.log.info("prepare `CHANGES.rst' for release")
f = codecs.open(changes_path, 'w', 'utf-8')
f.write(changes_txt)
f.close()

0 comments on commit 4381202

Please sign in to comment.