Create a release

How to create a release.

It is assumed, that all development branches (feature) are merged into the master branch and the release is created from the master branch. The examples will use release 0.15.0 as example.

If you are not sure about a step, save your progress in git, then execute the step. This way you can check the status with git status and git diff file and go back to the last step, if needed, with git checkout -- file.

  1. create a feature branch for finalizing the release (this differs from the mainline model, but I find it easier to work this way)

    repopath $ git checkout -b feature/release-0.15.0
    repopath $
    
  2. update changelog and changelog.md

    The first file is for debian packages, the latter for humans. Maybe in the future there will be a script converting one to the other, but for now redundancy rules.

  3. check if README.md is up-to-date

  4. check if documentation is up-to-date

  5. update refereemanager/src/main/resources/project.properties

    • version numbers
    • copyright information
  6. update version number in build/build.xml, as this cannot be done via script

  7. goto build directory

    repopath $ cd build/
    repopath/build $
    
  8. set version and copyright information in all files in directory refereemanager via ant task

    repopath/build $ ant setversion
    
    Buildfile: repopath/build/build.xml
    
    clearLog:
    
    setversion:
      [echo] @version
      [echo] docversion
      [echo] copyright
      [echo] Ready, now create new jar, edit changelog, then call 'sudo ant debinstall' (as root).
    
    BUILD SUCCESSFUL
    Total time: 1 second
    
    repopath/build $
    
  9. create new jar

    1. update refereemanager/pom.xml with correct version, check other information

    2. in eclipse right click pom.xml, then select Run As ‣ Maven build

      This calls maven with the goals clean compile package. If you do not use eclipse, call maven accordingly.

    3. copy the generated jar from refereemanager/target/refereemanager-version.jar to files/refereemanager.jar

    4. remove generated refereemanager/dependency-reduced-pom.xml

    5. remove generated refereemanager/target/ to get rid of old artifacts for further development

  10. create deb installer files via ant task

    Wichtig

    At this point changelog and changelog.md have to contain the correct release date (and time), as they are used in the generation steps.

    The task has to be called as root in order for user and group of the files to be correctly set.

    repopath/build $ sudo ant debinstall
    
    Buildfile: repopath/build/build.xml
    
    clearLog:
    
    debinstall:
         [copy] Copying 6 files to repopath/build/debian-tmp
         [gzip] Building: repopath/build/debian-tmp/usr/share/doc/refereemanager/changelog.gz
         [echo] Ready, now call 'ant createdeb' (not as root).
    
    BUILD SUCCESSFUL
    Total time: 1 second
    
    repopath/build $
    
  11. create deb file via dpkg and ant task

    repopath/build $ ant createdeb
    
    Buildfile: repopath/build/build.xml
    
    createdeb:
       [move] Moving 1 file to repopath/files
       [echo] Ready, now call 'sudo ant clearTmp' (as root).
    
    BUILD SUCCESSFUL
    Total time: 5 seconds
    
    repopath/build $
    
  12. remove temporary files as root via ant task

    repopath/build $ sudo ant clearTmp
    
    Buildfile: repopath/build/build.xml
    
    clearTmp:
     [delete] Deleting directory repopath/build/debian-tmp
       [echo] Ready, now call 'ant wininstall'.
    
    BUILD SUCCESSFUL
    Total time: 0 seconds
    
    repopath/build $
    
  13. create windows installer via NSIS and ant task

    repopath/build $ ant wininstall
    
    Buildfile: repopath/build/build.xml
    
    clearLog:
    
    wininstall:
         [copy] Copying 1 file to repopath/build/win-tmp
    
    installer:
    
    nsis:windows:
    
    nsis:unix:
    
    nsis:
         [move] Moving 1 file to repopath/files
       [delete] Deleting directory repopath/build/win-tmp
    
    BUILD SUCCESSFUL
    Total time: 1 second
    
    repopath/build $
    
  14. check if all files look good

  15. merge feature branch to master without fast forward

    repopath $ git checkout master
    ...
    repopath $ git merge --no-ff feature/release-0.15.0
    ...
    repopath $
    
  16. remove feature branch, remote too, if needed

    repopath $ git branch -d feature/release-0.15.0
    ...
    repopath $ git push origin --delete feature/release-0.15.0
    ...
    repopath $
    
  17. create release branch, tag release

    repopath $ git checkout -b release/0.15
    ...
    repopath $ git tag -a 0.15.0
    ...
    repopath $
    
  18. push everything if you haven’t done so yet

    repopath $ git push --all
    ...
    repopath $ git push --tags
    ...
    repopath $
    
  19. upload files to sourceforge