This document describes briefly the recommended procedure of releasing a new version of RMOL using a Linux development machine and the GitHub project site.
The following steps are required to make a release of the distribution package.
Clone locally the full Git project:
$ mkdir -p ~/dev/sim $ cd ~/dev/sim $ git clone git@github.com:airsim/rmol.git rmolgit # If SSH is allowed $ git clone https://github.com/airsim/rmol.git rmolgit # If the firewall does not allow SSH $ cd rmolgit $ git checkout trunk
Switch to the release branch, on your local clone, and merge the latest updates from the trunk. Decide about the new version to be released.
cd ~/dev/sim/rmolgit git checkout releases git merge trunk
Update the version in the various build system files, replacing the old version numbers by the correct ones:
vi CMakeLists.txt vi autogen.sh vi README
Update the version, add some news in the NEWS
file, add a change-log in the ChangeLog
file and in the RPM specification files:
vi NEWS vi ChangeLog vi rmol.spec
Commit the new release:
cd ~/dev/sim/rmolgit git add -A git commit -m "[Release 1.00.3] Release of the 1.00.3 version of RMOL." git push
Create the distribution packages using the following command:
cd ~/dev/sim/rmolgit git checkout releases rm -rf build && mkdir -p build cd build export INSTALL_BASEDIR=~/dev/deliveries export RMOL_VER=99.99.99 export LIBSUFFIX_4_CMAKE="-DLIB_SUFFIX=64" cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_BASEDIR}/rmol-$RMOL_VER \ -DWITH_STDAIR_PREFIX=${INSTALL_BASEDIR}/stdair-stable \ -DWITH_AIRRAC_PREFIX=${INSTALL_BASEDIR}/airsched-stable \ -DWITH_AIRRAC_PREFIX=${INSTALL_BASEDIR}/airrac-stable \ -DWITH_RMOL_PREFIX=${INSTALL_BASEDIR}/rmol-stable \ -DWITH_RMOL_PREFIX=${INSTALL_BASEDIR}/airinv-stable \ -DWITH_RMOL_PREFIX=${INSTALL_BASEDIR}/simfqt-stable \ -DCMAKE_BUILD_TYPE:STRING=Debug -DINSTALL_DOC:BOOL=ON \ ${LIBSUFFIX_4_CMAKE} .. make check && make dist make install
This will configure, compile and check the package. The output packages will be named, for instance, rmol-$RMOL_VER.tar.gz
and rmol-$RMOL_VER.tar.bz2
.
Optionally, generate the RPM package (for instance, for Fedora/RedHat):
cd ~/dev/sim/rmolgit/build git checkout releases make dist
To perform this step, rpm-build, rpmlint and rpmdevtools have to be available on the system.
cp ../rmol.spec ~/dev/packages/SPECS \ && cp rmol-$RMOL_VER.tar.bz2 ~/dev/packages/SOURCES cd ~/dev/packages/SPECS rpmbuild -ba rmol.spec cd ~/dev/packages rpmlint -i SPECS/rmol.spec SRPMS/rmol-$RMOL_VER-1.f22.src.rpm \ RPMS/noarch/rmol-* RPMS/i686/rmol-*
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 RMOL's Git repository.
Create the binary package, which includes HTML and PDF documentation, using the following command:
cd ~/dev/sim/rmolgit/build git checkout releases make package
The output binary package will be named, for instance, rmol-$RMOL_VER-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.
GitHub allows to archive/generate packages (tar-balls) corresponding to Git tags.
In order to update the Web site files:
$ export RMOL_VER=99.99.99 $ cd ~/dev/sim/rmolgit $ git checkout $RMOL_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}/rmol-$RMOL_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/rmol/html/ ./ $ git checkout -- .gitignore README.md CNAME $ git add . $ git commit -m "[Doc] Updated the documentation for $RMOL_VER" $ git push $ git branch -d gh-pages