Skip to content

Commit

Permalink
zest.releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
posativ committed Mar 18, 2013
1 parent 0a227df commit 134da88
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 55 deletions.
58 changes: 24 additions & 34 deletions CHANGES.md → CHANGES
@@ -1,9 +1,8 @@
# Acrylamid Changelog
Changelog for Acrylamid
=======================

Version 0.7
-----------

Not released – TBD
0.7 (unreleased)
----------------

### What's new?

Expand All @@ -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.

Expand Down Expand Up @@ -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!

Expand Down Expand Up @@ -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!

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion MANIFEST.in
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions acrylamid/__init__.py
Expand Up @@ -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/'

Expand Down Expand Up @@ -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")

Expand Down
7 changes: 4 additions & 3 deletions acrylamid/commands.py
Expand Up @@ -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
Expand All @@ -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):
Expand Down
1 change: 1 addition & 0 deletions acrylamid/lib/CHANGES
1 change: 0 additions & 1 deletion acrylamid/lib/CHANGES.md

This file was deleted.

11 changes: 7 additions & 4 deletions acrylamid/lib/history.py
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
17 changes: 11 additions & 6 deletions docs/conf.py
@@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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)
]
3 changes: 3 additions & 0 deletions requirements.txt
Expand Up @@ -2,6 +2,9 @@
Attest-latest==0.6dev-20121124
cram==0.5

# releasing
zest.releaser

# requirements
Jinja2==2.6
Markdown==2.2.1
Expand Down
5 changes: 1 addition & 4 deletions setup.py
Expand Up @@ -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 = {}

Expand All @@ -27,7 +24,7 @@

setup(
name='acrylamid',
version=version,
version='0.7.dev0',
author='Martin Zimmermann',
author_email='info@posativ.org',
packages=find_packages(),
Expand Down

0 comments on commit 134da88

Please sign in to comment.