Documentation Release Process

From GnuCash
Revision as of 15:52, 2 July 2016 by Jralls (talk | contribs) (Consolidate all of the major release actions into their own section.)
Jump to: navigation, search

This page gathers the steps for a release of the GnuCash documentation. It was animated by Bug 652350 - Formalize the Documentation release process.

URLs

URL Meaning
ssh://code.gnucash.org/gnucash-docs source files of the docs
ssh://code.gnucash.org/gnucash-htdocs-docs ready docs to be presented at ...
ssh://code.gnucash.org/gnucash-htdocs source files of www.gnucash.org

Releases

Beginning with 2.6.0, documentation releases should be done at the same time as GnuCash releases, with the Documentation release number corresponding to the GnuCash release. Do this even if there are no significant documentation changes in order to keep the numbers synchronized.

Branching Policy

As with development, we maintain two documentation branches, master and maint for whatever the current stable version is (at this writing it's 2.6).

  • Documentation updates describing features which are exclusively in code's master branch should be applied only on master.
  • All others should be applied on maint and then merged in master.

Check Git#Branching and Merging to see if something changed.

Major Releases

A major release is the first release to bring new development features to the users. This is shown by a jump in the version number (for example from 2.6.x to 2.8.0), and signifies the start of a new major development cycle.

git

This means the branches in our repository have to be reshuffled. The release is done from a commit on the master branch. This commit should now become the HEAD commit for the maint branch because maintenance should now happen from there on. At the same time it may be necessary to keep up maintenance to the previous major series, so this should now get its own branch.

 git branch maint-X.Y maint # for example git branch maint-2.6 maint
 git checkout maint
 git merge --ff-only master

GnuCash Wiki

  • Update the documentation tables at the beginning of FAQ and De/FAQ, which have links to the documentation which includes the major version.
  • Create a new Release Schedule for the new series.

Guide

Update the Release Schedule link in guide/x/ch_oview.xml to match the new heading in the wiki. Note: The Italian translation uses a po file instead of fully translated copies of the documents. You must edit the po file then update the gnucash.xml using the instructions in the README file.

Website

Create a new directory for the documentation in the website repo:

 mkdir v2.8
 git add v2.8

Checkout release branch

  • Determine which branch to do the release from:
    • If you want to release a new maintenance release on the current stable series (like 2.6.1, 2.6.2,...) then choose maint
    • If you want to release a new maintenance release on an older stable series (like 2.4.16 if 2.6.x is the current stable series) then choose maint-X.Y
    • If you are about to release a development snapshot (like 2.7.0, 2.7.1,...), choose master
  • Clone gnucash-docs if you don't already have one.
 git clone ssh://code.gnucash.org/gnucash-docs
  • Check out the branch you want and make sure that it's up-to-date:
 cd gnucash-docs
 git checkout <branch>
 git pull --rebase

If you are about to release from master you should verify that master is a superset of maint. You can do this by running the following command

 git log master..maint

This command should not list any commits. If it does, checkout master and merge maint into it.

 git checkout master
 git merge maint
Note
The same check should be performed when releasing from maint and there is an older maint-X.Y branch on which commits still happen.

Checks and Updates

  • In each copy of gnucash-help.xml and gnucash-guide.xml, update the document history and version numbers.
  • Update the copyright - the year might change.
  • Check if Authors, Maintainers and Translators from main documents are in sync with
    • the related OMF files (has someone expirience with existing tools for this task?) and
    • AUTHORS
  • Check if gnucash/DOCUMENTERS both trunk and stable is in sync with gnucash-docs/AUTHORS.
  • Update the version number of the [AC_INIT] macro in configure.ac
  • Update NEWS by running ../gnucash/util/gitlog2ul.sh <previous version> > release.news and copying over the changes, reformatting appropriately.
  • Update the ChangeLog:
 git log --format="%ad %aN %n%n%x09* %s%d%n" --date=short <previous release tag>.. > ChangeLogNew
 mv ChangeLog ChangeLogOld
 cat ChangeLogNew ChangeLogOld > ChangeLog
 rm ChangeLogNew
 rm ChangeLogOld 
  • Commit this change as "Release X.X.X"

Git

  • Verify that the chosen branch can build a distribution tarball, compile, and test it satisfactorily:
./autogen.sh
./configure
make distcheck
Fix any errors this step may turn up, commit and check again.
  • Tag the release and push:
 git tag -am "Release 2.6.2" 2.6.2
 git push --tags origin <branch>

Source tarballs

  • After the tag has propagated, clone your repo to make sure that no stray changes are put in the tarball. For example:
cd ..
rm -rf gnucash-docs-release 
git clone gnucash-docs -b 2.6 gnucash-docs-release
  • Inside gnucash-docs-release, run
./autogen.sh
mkdir build
cd build
../configure
make distcheck

Note that the build is done in a subdirectory here. This is not strictly necessary, but it will simplify some of the future steps in the documentation release process.

The above commands should generate a gzip compressed tarball in the build directory. (Using "make distcheck" instead of only "make dist" does not only create the tarball, but also runs a complete compilation run on the created tarball so that missing files are discovered immediately.)

Other documentation formats

Next to source tarballs, GnuCash also offers the documentation in several other formats for on-line or off-line reading. Currently these formats are html, pdf, epub and mobi.

Building these requires the Apache FOP (XML Formatting-objects Processor) for PDF and Calibre for mobi ebooks.

  • In the same build directory we created in the previous step, run
../configure --with-mobi
make html pdf epub mobi

This should generate the various alternative formats in subdirectories per document (guide or help) and per language (like C, de, it and so on).

Sourceforge file uploads

The tarball generated above should be uploaded to Source Forge.

  • Log in on the [Source Forge GnuCash website]
  • Go to the Project Admin -> File Manager section
  • Create a new directory for the release under gnucash-docs
  • Upload the file created above to this directory.

Git housekeeping after a release

If any changes were committed during the release steps above, merge these upwards to the other upstream branches. For example if you committed something to maint, merge maint into master:

 git checkout master
 git merge maint

Expect a merge conflict here for the changed version number. This is normal and the conflict should be resolved by keeping the version number in master. There may be other merge conflicts. Evaluate them and fix them accordingly.

If the release was from an older maint-X.Y branch, merge these changes into maint and then merge maint into master. Expect the same version number conflict during the merges.

The first command creates a maintenance branch for the old stable release series. The subsequent commands move maint to where master is now. If the latter command fails there are commits on the maint branch that didn't get merged into master. This should not happen if the earlier steps were followed to verify master is a superset of maint.

GnuCash Website

Uploading the new documentation versions

The additional documentation formats have to be uploaded to the gnucash website. The website is also managed in git, so to get the documentation in there, the current website sources have to be checked out:

  • Move one level up from the gnucash-docs-release directory created above
 git clone ssh://code.gnucash.org/gnucash-htdocs-docs

You should now have the gnucash-docs-release and gnucash-htdocs-docs directories next to each other. Inside the htdocs-docs directory you will find a subdirectory docs and in there a subdirectory per major release (v1.8, v2.0, v2.2,...). Note that each version directory starts with a lowercase "v" (from "version")

Next, we'll copy all of the alternative documentation formats into the version directory. The most efficient way is by using rsync. These commands accomplish this:

base="$PWD/gnucash-htdocs-docs/v2.6"
(cd gnucash-docs-release/build/guide; for i in C de it ja pt; do rsync -av --delete $i/gnucash-guide{,.pdf,.epub,.mobi} $base/$i/;done)
(cd gnucash-docs-release/build/help; for i in C de it pt; do rsync -av --delete $i/gnucash-help{,.pdf,.epub,.mobi} $base/$i/;done)

You should find in the gnucash-htdocs-docs directory a shell script named copy-files.sh which does the rsync for you:

 ./copy-files.sh /path/to/build_dir v2.6

N.B.: The path must be absolute for it to work correctly.

Note that the commands should be run from the parent directory of gnucash-docs-release and gnucash-htdocs, and the parentheses are important.

If that worked well, you can now go into the gnucash-htdocs-docs directory and use git add to add new files and git rm to remove deleted files from the repository (if any):

cd gnucash-htdocs-docs
git status
# This will show a list of new/changed/deleted files.
git add v2.6
git rm [deleted files]...
git commit -m "Add documentation version 2.6.2 to the GnuCash website"
git push origin <branch>