StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
Make a new release

Introduction

This document describes briefly the recommended procedure of releasing a new version of StdAir using a Linux development machine and the GitHub project site.

The following steps are required to make a release of the distribution package.

Initialisation

Clone locally the full Git project:

$ mkdir -p ~/dev/sim
$ cd ~/dev/sim
$ git clone git@github.com:airsim/stdair.git stdairgit # If SSH is allowed
$ git clone https://github.com/airsim/stdair.git stdairgit # If the firewall does not allow SSH
$ cd stdairgit
$ git checkout trunk

Branch creation

Create the branch, on your local clone, corresponding to the new release (say, 1.00.3):

cd ~/dev/sim/stdairgit
git checkout trunk
git checkout -b 1.00.3

Update the version in the various build system files, replacing 99.99.99 by the correct version number:

vi CMakeLists.txt
vi autogen.sh

Update the version and add a change-log in the ChangeLog and in the RPM specification files:

vi ChangeLog
vi stdair.spec

Commit and publish the release branch

Commit the new release:

cd ~/dev/sim/stdairgit
git add -A
git commit -m "[Release 1.00.3] Release of version 1.00.3."
git push

Update the change-log in the trunk as well

Update the change-log in the ChangeLog and RPM specification files:

cd ~/dev/sim/stdairgit
git checkout trunk
vi ChangeLog
vi stdair.spec

Commit the change-logs and publish the trunk (main development branch):

git commit -m "[Doc] Integrated the change-log of the release 1.00.3."
git push

Create distribution packages

Create the distribution packages using the following command:

cd ~/dev/sim/stdairgit
git checkout 1.00.3
rm -rf build && mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/home/user/dev/deliveries/stdair-1.00.3 \
 -DCMAKE_BUILD_TYPE:STRING=Debug -DINSTALL_DOC:BOOL=ON ..
make check && make dist

This will configure, compile and check the package. The output packages will be named, for instance, stdair-1.00.3.tar.gz and stdair-1.00.3.tar.bz2.

Generation the RPM packages

Optionally, generate the RPM package (for instance, for Fedora/RedHat):

cd ~/dev/sim/stdairgit
git checkout 1.00.3
rm -rf build && mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/home/user/dev/deliveries/stdair-99.99.99 \
 -DCMAKE_BUILD_TYPE:STRING=Debug -DINSTALL_DOC:BOOL=ON ..
make dist

To perform this step, rpm-build, rpmlint and rpmdevtools have to be available on the system.

cp stdair.spec ~/dev/packages/SPECS \
  && cp stdair-1.00.3.tar.bz2 ~/dev/packages/SOURCES
cd ~/dev/packages/SPECS
rpmbuild -ba stdair.spec
rpmlint -i ../SPECS/stdair.spec ../SRPMS/stdair-1.00.3-1.fc15.src.rpm \
  ../RPMS/noarch/stdair-* ../RPMS/i686/stdair-*

Update distributed change log

Update the NEWS and ChangeLog files with appropriate information, including what has changed since the previous release. Then commit and push the changes into the StdAir's Git repository.

Create the binary package, including the documentation

Create the binary package, which includes HTML and PDF documentation, using the following command:

make package

The output binary package will be named, for instance, stdair-1.00.3-Linux.tar.bz2. That package contains both the HTML and PDF documentation. The binary package contains also the executables and shared libraries, as well as C++ header files, but all of those do not interest us for now.

Files on GitHub

GitHub allows to archive/generate packages (tar-balls) corresponding to Git tags.

Upload the documentation to GitHub

In order to update the Web site files:

$ export STDAIR_VER=1.00.3
$ cd ~/dev/sim/stdairgit
$ git checkout $STDAIR_VER
$ cd build
$ export INSTALL_BASEDIR=~/dev/deliveries
$ if [ -d /usr/lib64 ]; then LIBSUFFIX=64; fi
$ export LIBSUFFIX_4_CMAKE="-DLIB_SUFFIX=$LIBSUFFIX"
$ rm -rf build && mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_BASEDIR}/stdair-$STDAIR_VER \
        -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_TEST:BOOL=ON \
        -DINSTALL_DOC:BOOL=ON -DRUN_GCOV:BOOL=OFF ${LIBSUFFIX_4_CMAKE} ..
$ make check && make install
$ cd ..
$ git checkout gh-pages
$ rsync -av --del --exclude=.git $INSTALL_BASEDIR/share/doc/stdair/html/ ./
$ git checkout -- .gitignore README.md CNAME
$ git add .
$ git commit -m "[Doc] Updated the documentation for $STDAIR_VER"
$ git push
$ git branch -d gh-pages