################################################################################
###
### How to release a new version of Snoopy Logger
###
################################################################################

Steps:


1. Run these tools to ensure code quality and consistency:

    1a. Run autoscan and compare results:
        - before runnint autoscan, do this:
            -> ./bootstrap
            -> ./configure --enable-everything
            -> (reason: sometimes more things are detected as needed this way)
        - 'autoscan'
        - use 'git diff' to see if anything changed from previous run
        - add suggestions to configure.ac
        - compare configure.scan to configure.ac
        - update config.h.in
        - commit
        - cleanup:
            -> make maintainer-clean

    1b. Push latest changes to GitHub, wait for Travis to confirm that builds are
        passing successfully.

    1c. Check build with valgrind:
        - ./configure --enable-everything
        - make valgrind
        - fix anny errors that valgrind reports
        - commit

    1d. Create build and upload it to Coverity:
        (- ./configure --enable-everything)
        - two ways, either
            -> merge to-be-released branch to coverity_scan branch, or
            -> ./doc/releasing/bin/submit-to-coverity.sh
        - wait for coverity scan to complete
        - check for errors, fix them, rinse and repeat until no more errors are found


2. Update documentation TOCs
    - use this tool: https://github.com/ekalinin/github-markdown-toc
    - commit


3. Update version info and release:
    a) Edit files:
        1. ChangeLog
        2. README.md (a: update latest version(s), b: add to NEWS section)
    b) Commit with sign-off, with exact message "Release X.Y.Z" on the first line,
        create git tag "snoopy-X.Y.Z"
        Actual commands to run:
    c) Run release script:
        (see below)
    d) Merge to stable branch and push:
        (see below)

    Command to run that does steps b) to d) automatically:

export REL_VERSION=`./build/get-version.sh changelog` &&
git add ChangeLog README.md &&
git commit -s -m "Release $REL_VERSION" &&
git tag "snoopy-$REL_VERSION" &&
./doc/releasing/bin/create-release.sh "snoopy-$REL_VERSION" &&

git checkout stable &&
git pull &&
git merge --ff master &&
git push &&
git checkout master &&
#(or git merge snoopy-$REL_VERSION <--- UNTESTED)

unset REL_VERSION



4. All done.
