Permalink
Browse files

zest.releaser

  • Loading branch information...
posativ committed Mar 18, 2013
1 parent 0a227df commit 134da8840bf281929bda63cf285c1a89d5390aaa
Showing with 56 additions and 55 deletions.
  1. +24 −34 CHANGES.md → CHANGES
  2. +1 −1 MANIFEST.in
  3. +4 −2 acrylamid/__init__.py
  4. +4 −3 acrylamid/commands.py
  5. +1 −0 acrylamid/lib/CHANGES
  6. +0 −1 acrylamid/lib/CHANGES.md
  7. +7 −4 acrylamid/lib/history.py
  8. +11 −6 docs/conf.py
  9. +3 −0 requirements.txt
  10. +1 −4 setup.py
View
@@ -1,9 +1,8 @@
-# Acrylamid Changelog
+Changelog for Acrylamid
+=======================
-Version 0.7
------------
-
-Not released – TBD
+0.7 (unreleased)
+----------------
### What's new?
@@ -17,8 +16,8 @@ Not released – TBD
### What has been fixed?
-Version 0.6
------------
+0.6 (2013-02-12)
+----------------
Released on February, 12th, 2013 – Almost stable.
@@ -66,8 +65,8 @@ Released on February, 12th, 2013 – Almost stable.
- #103 – pass encoded values into `os.environ` to allow fancy unicode
characters such as » or Aкриламид.
-Version 0.5
------------
+0.5 (2013-01-20)
+----------------
Released on January, 20th 2013 – Winter Is Coming!
@@ -121,8 +120,8 @@ Released on January, 20th 2013 – Winter Is Coming!
- #77 – missing items in sitemap view
- #75 – dotfiles not copied from the static folder (Mark van Lent)
-Version 0.4
------------
+0.4 (2012-09-19)
+----------------
Released on September, 19th 2012 – Arrr!
@@ -163,8 +162,8 @@ thank @markvl, @moschlar and @t-8ch for their patches and patience to test
broken builds.
-Version 0.3
------------
+0.3 (2012-04-11)
+----------------
### 0.3.5
@@ -258,35 +257,26 @@ Released on April, 1th 2012 – Aprilscherz
- some unit tests
- speed improvements
-Version 0.2
------------
-
-### 0.2.2
+0.2 (2011-12-16)
+----------------
- add static page support (see docs/howtows.rst)
- fix update when entry moved/drafted
-
-### 0.2.1
-
- new draft feature that excludes entries from everything except entry view
- minor bugfixes
-
-### 0.2.0
-
-Released on 16th December 2011
-
- introduced caching
- lazy evaluation for expensive operations
- first docs
-Version 0.1.11
---------------
-
-- Tag-View
-- pass-through filter
-- removed pyyaml dependency
+0.1 (2011-11-16)
+----------------
-Version 0.1.10
---------------
+Initial release.
-Initial release, released on November 16th 2011
+- german hyphenation support
+- summarizing page/items
+- reStructuredText and Markdown Markup Support
+- RSS and Atom feed generation
+- theming support using Jinja2
+- flat file database
+- powerful callback API
View
@@ -4,7 +4,7 @@ recursive-exclude acrylamid *.pyc
recursive-include acrylamid/filters/hyph *.txt
recursive-include acrylamid/defaults *
-include acrylamid/lib/CHANGES.md
+include acrylamid/lib/CHANGES
include acrylamid/views/search/search.js
include acrylamid/specs/samples/blog.posativ.org.xml
View
@@ -16,7 +16,9 @@
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Martin Zimmermann <info@posativ.org>.
-__version__ = '0.6.0'
+import pkg_resources
+dist = pkg_resources.get_distribution("acrylamid")
+
__author__ = 'Martin Zimmermann <info@posativ.org>'
__url__ = 'https://github.com/posativ/acrylamid/'
@@ -79,7 +81,7 @@ def Acryl():
parser.add_argument("--conf", dest="conf", help="alternate conf.py",
default="conf.py", metavar="/path/to/conf")
parser.add_argument("--version", action="version",
- version=colors.blue('Acrylamid ') + __version__)
+ version=colors.blue('Acrylamid ') + dist.version)
subparsers = parser.add_subparsers(dest="parser")
View
@@ -15,10 +15,12 @@
from collections import defaultdict
from os.path import getmtime
+from distutils.version import LooseVersion
+
from acrylamid import log
from acrylamid.errors import AcrylamidException
-from acrylamid import readers, filters, views, assets, refs, hooks, helpers, __version__
+from acrylamid import readers, filters, views, assets, refs, hooks, helpers, dist
from acrylamid.lib import lazy, history
from acrylamid.core import cache, load
from acrylamid.utils import hash, istext, HashableList, import_object, total_seconds
@@ -34,8 +36,7 @@ def initialize(conf, env):
cache.init(conf.get('cache_dir'))
env['version'] = type('Version', (str, ), dict(zip(
- ['major', 'minor', 'patch'], (int(x) for x in __version__.split('.'))
- )))(__version__)
+ ['major', 'minor'], LooseVersion(dist.version).version[:2])))(dist.version)
# crawl through CHANGES.md and stop on breaking changes
if history.breaks(env, cache.emptyrun):
View
View
View
@@ -19,7 +19,7 @@
def changesfor(version):
"""return CHANGES for `version` and whether it *breaks*."""
- with io.open(join(dirname(PATH), 'CHANGES.md'), encoding='utf-8') as fp:
+ with io.open(join(dirname(PATH), 'CHANGES'), encoding='utf-8') as fp:
rv = []
section, paragraph, safe = False, False, True
@@ -29,7 +29,7 @@ def changesfor(version):
if not line:
continue
- m = re.match('^version (\d\.\d)$', line, re.IGNORECASE)
+ m = re.match(r'^(\d\.\d) \(\d{4}-\d{2}-\d{2}\)$', line)
if m:
section = m.group(1) == version
@@ -62,19 +62,22 @@ def breaks(env, firstrun):
if version >= (env.version.major, env.version.minor):
return False
- memoize('version', (env.version.major, env.version.minor, env.version.patch))
+ memoize('version', (env.version.major, env.version.minor))
if firstrun:
return False
broken = False
- print
for major in range(version[0], env.version.major or 1):
for minor in range(version[1], env.version.minor):
rv, hints = changesfor('%i.%i' % (major, minor + 1))
broken = broken or rv
+ if not hints:
+ continue
+
+ print
print (blue('Acrylamid') + ' %i.%s' % (major, minor+1) + u' – changes').encode('utf-8'),
if broken:
View
@@ -1,6 +1,11 @@
# -*- coding: utf-8 -*-
-import sys, os
+import sys
+import os
+import datetime
+import pkg_resources
+
+from distutils.version import LooseVersion
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -20,10 +25,10 @@
# General information about the project.
project = u'Acrylamid'
-copyright = u'2013, posativ'
+copyright = u'%i, Martin Zimmermann' % datetime.date.today().year
-version = '0.6'
-release = '0.6.0'
+release = pkg_resources.get_distribution("acrylamid").version # 0.6, 0.6.1, 0.7 or 0.7.1
+version = '%i.%i' % tuple(LooseVersion(release).version[:2]) # 0.6 or 0.7
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -41,7 +46,7 @@
latex_documents = [
('index', 'acrylamid.tex', u'Acrylamid Documentation',
- u'posativ', 'manual'),
+ u'Martin Zimmermann', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -74,5 +79,5 @@
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'acrylamid', u'Acrylamid Documentation',
- [u'posativ'], 1)
+ [u'Martin Zimmermann'], 1)
]
View
@@ -2,6 +2,9 @@
Attest-latest==0.6dev-20121124
cram==0.5
+# releasing
+zest.releaser
+
# requirements
Jinja2==2.6
Markdown==2.2.1
View
@@ -6,9 +6,6 @@
from os.path import join, dirname
from setuptools import setup, find_packages
-version = re.search("__version__ = '([^']+)'",
- open('acrylamid/__init__.py').read()).group(1)
-
requires = ['Jinja2>=2.4', 'Markdown>=2.0.1']
kw = {}
@@ -27,7 +24,7 @@
setup(
name='acrylamid',
- version=version,
+ version='0.7.dev0',
author='Martin Zimmermann',
author_email='info@posativ.org',
packages=find_packages(),

0 comments on commit 134da88

Please sign in to comment.