Skip to content

Commit

Permalink
Merge branch '1.0'
Browse files Browse the repository at this point in the history
Conflicts:
	version
  • Loading branch information
agateau committed Dec 3, 2015
2 parents 72d78f5 + 3c3dc66 commit 1191adb
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 23 deletions.
6 changes: 5 additions & 1 deletion MANIFEST.in
@@ -1,11 +1,15 @@
include bin/fromsrc.py
include update/update*to*
include update/*py
include doc/*.md
include man/*.1
include icon/*
include scripts/*
include *py
include README.md
include LICENSE
include MANIFEST.in
include version
include NEWS
include yokadi
include *requirements.txt
include .travis.yml
8 changes: 8 additions & 0 deletions NEWS
@@ -1,3 +1,11 @@
v1.0.1 2015/12/03

- User changes:
- Make sure installing via pip installs the required dependencies

- Developer changes:
- Improved release process

v1.0.0 2015/11/29

- User changes:
Expand Down
80 changes: 58 additions & 22 deletions doc/release.md
@@ -1,54 +1,90 @@
# Release check list

## Introduction

A series is major.minor (ex: 0.12). There is a branch for each series.

A version is major.minor.patch (ex 0.12.1). There is a tag for each version.

This doc assumes there is a checkout of yokadi.github.com next to the checkout
of yokadi.

## In yokadi checkout

Ensure checkout is up to date
export version=<version>
export series=<series>

Ensure version is OK in "version" file
### For a new series

Ensure NEWS file is up to date with new stuff and correct release date
Update `NEWS` file (add changes, check release date)

Run tests
Ensure `version` file contains $version

Series is major.minor (ex: 0.12)
Version is major.minor.patch (ex 0.12.1)
Create branch:

For a new series:
git checkout -b $series
git push -u origin $series

git checkout -b <series>
git push origin <series>:<series>
The version in master should always be bigger than the version in release
branches, so update version in master:

For a new release in an existing series:
git checkout master
vi version
git commit version -m "Bump version number"
git push
git checkout -

### For a new release in an existing series

git checkout <series>

In all cases:
Update `NEWS` file (add changes, check release date)

Bump version number

echo $version > version
git commit version -m "Getting ready for $version"

git tag -a <version>
### Common

Build archives

./scripts/mkdist.sh ../yokadi.github.com/download

Tag

git tag -a $version -m "Releasing $version"

Push changes

git push
git push --tags

Bump version on master
Merge changes in master (so that future forward merges are simpler). Be careful
to keep version to its master value.

git checkout master
vi version
git commit version
git merge --no-ff $series
git push
git checkout -

Go back to branch in order to prepare tarballs
## Post on PyPI

git checkout <series>
twine upload ../yokadi.github.com/download/yokadi-$version.*

## In yokadi.github.com checkout

Ensure checkout is up to date

./updatedoc.py <path/to/yokadi/checkout> .
./mkdist.sh <path/to/yokadi/checkout> download/
Update documentation

./updatedoc.py ../yokadi .

Write a blog entry in `_posts/`

Update version in download page (download.markdown)
Update version in download page (`download.md`)

## Tell the world
## Upload on PyPI

- pypi.python.org
cd download/
twine upload yokadi-<version>.*
File renamed without changes.
67 changes: 67 additions & 0 deletions scripts/mkdist.sh
@@ -0,0 +1,67 @@
#!/bin/sh
set -e

PROGNAME="$(basename "$0")"

die() {
echo "$PROGNAME: ERROR: $*" | fold -s -w "${COLUMNS:-80}" >&2
exit 1
}

log() {
echo "### $*" >&2
}

[ $# = 1 ] || die "USAGE: $PROGNAME <dst/dir>"

SRC_DIR=$(cd "$(dirname $0)/.." ; pwd)
DST_DIR=$(cd "$1" ; pwd)

[ -d "$DST_DIR" ] || die "Destination dir '$SRC_DIR' does not exist"

WORK_DIR=$(mktemp -d "$DST_DIR/yokadi-dist.XXXXXX")

log "Copying source"
cp -a --no-target-directory "$SRC_DIR" "$WORK_DIR"

log "Check we are not master"
cd "$WORK_DIR"
BRANCH=$(git branch | awk '$1 == "*" { print $2 }')
[ "$BRANCH" != "master" ] || die "Source dir should point to a release branch checkout, not master!"

log "Cleaning"
git reset --hard HEAD
git clean -q -dxf

log "Building archives"
./setup.py -q sdist --formats=bztar,zip

log "Installing archive"
cd dist/
YOKADI_TARBZ2=$(ls ./*.tar.bz2)
tar xf "$YOKADI_TARBZ2"

ARCHIVE_DIR="$PWD/${YOKADI_TARBZ2%.tar.bz2}"

virtualenv --python python3 "$WORK_DIR/venv"
(
. "$WORK_DIR/venv/bin/activate"

# Install Yokadi in the virtualenv and make sure it can be started
# That ensures dependencies got installed by pip
log "Smoke test"
pip3 install "$ARCHIVE_DIR"
yokadi exit

log "Installing extra requirements"
pip3 install -r "$ARCHIVE_DIR/extra-requirements.txt"

log "Running tests"
"$ARCHIVE_DIR/yokadi/tests/tests.py"
)

log "Moving archives out of work dir"
cd "$WORK_DIR/dist"
mv ./*.tar.bz2 ./*.zip "$DST_DIR"
rm -rf "$WORK_DIR"
log "Done"
6 changes: 6 additions & 0 deletions setup.py
Expand Up @@ -78,6 +78,12 @@ def createFileList(sourceDir, *patterns):
"yokadi.ycli",
"yokadi.yical",
],
# distutils does not support install_requires, but pip needs it to be
# able to automatically install dependencies
install_requires=[
"sqlalchemy",
"python-dateutil",
],
scripts=scripts,
data_files=data_files
)

0 comments on commit 1191adb

Please sign in to comment.