Changeset - 497a24aaaecb
[Not reviewed]
default
0 1 0
Branko Majic (branko) - 6 years ago 2017-12-20 13:40:00
branko@majic.rs
CONNT-29: Minor fixes for release procedure.
1 file changed with 21 insertions and 17 deletions:
0 comments (0 inline, 0 general)
docs/releaseprocedures.rst
Show inline comments
 
@@ -42,71 +42,75 @@ nomenclature for naming the branches:
 
- All new development and bug-fixing uses ``default`` branch as the base.
 
- Patch releases are based off the maintenance branches. Mainteance branches are
 
  named after the ``MAJOR`` and ``MINOR`` number of the version. For example, if
 
  a new release is made with version ``1.2.0``, the corresponding branch that is
 
  created for maintenance will be named ``1.2`` (notice the absence of ``.0`` at
 
  the end).
 

	
 

	
 
Writing release notes
 
---------------------
 

	
 
Release notes should be updated in relevant branches as the issues are
 
getting resolved. You can use the following template when filling-up
 
the release notes::
 
getting resolved. The following template should be used when
 
filling-up the release notes (take note the links to issues are kept
 
on separate page)::
 

	
 
  VERSION
 
  -------
 

	
 
  GENERAL DESCRIPTION
 

	
 
  Breaking changes:
 

	
 
  * DESCRIPTION [ `CONNT-NUMBER <https://projects.majic.rs/conntrackt/issues/CONNT-NUMBER>`_ ]
 
  * DESCRIPTION
 
    [ `CONNT-NUMBER <https://projects.majic.rs/conntrackt/issues/CONNT-NUMBER>`_ ]
 

	
 
  New features/improvements:
 

	
 
  * DESCRIPTION [ `CONNT-NUMBER <https://projects.majic.rs/conntrackt/issues/CONNT-NUMBER>`_ ]
 
  * DESCRIPTION
 
    [ `CONNT-NUMBER <https://projects.majic.rs/conntrackt/issues/CONNT-NUMBER>`_ ]
 

	
 
  Bug-fixes:
 

	
 
  * DESCRIPTION [ `CONNT-NUMBER <https://projects.majic.rs/conntrackt/issues/CONNT-NUMBER>`_ ]
 
  * DESCRIPTION
 
    [ `CONNT-NUMBER <https://projects.majic.rs/conntrackt/issues/CONNT-NUMBER>`_ ]
 

	
 

	
 
Release issue template
 
----------------------
 

	
 
In order to make life easier, the following template can be used when
 
creating the issue for a release in the issue tracker:
 
The following template can be used when creating the issue for a
 
release in the issue tracker:
 

	
 
- Set *subject* to ``Release version MAJOR.MINOR.PATCH``.
 
- Set *description* to::
 

	
 
    Release version MAJOR.MINOR.PATCH. Release should be done
 
    according to release procedures outlined in offline documentation.
 

	
 

	
 
Backporting fixes
 
-----------------
 

	
 
From time to time it might become useful to apply a bug-fix to both the master
 
branch, and to maintenace branch.
 
From time to time it might become useful to apply a bug-fix to both
 
the default development branch, and to maintenace branch.
 

	
 
When a bug is discovered in one of the roles (or maybe documentation), and it
 
should be applied to maintenance branch as well, procedure is as follows:
 

	
 
1. Create a new bug report in `issue tracker
 
   <https://projects.majic.rs/conntrackt>`_. Target version should be
 
   either the next minor or next major release (i.e. whatver will get released
 
   from the master branch).
 
   from the default development branch).
 

	
 
2. Create a copy of the bug report, modifying the issue title to include phrase
 
   ``(backport to MAJOR.MINOR)`` at the end, with ``MAJOR`` and ``MINOR``
 
   replaced with correct versioning information for the maintenance
 
   branch. Make sure to set correct target version (patch release).
 

	
 
3. Resolve the bug for next major/minor release.
 

	
 
4. Reslove the bug in maintenace branch by backporting (using graft if
 
   possible) the fix into maintenace branch. Make sure to reword the
 
   commit message (to reference the backport issue) .
 

	
 
@@ -122,31 +126,31 @@ Perform the following steps in order to 
 

	
 
1. Verify that there are no outstanding issues blocking the release.
 

	
 
2. Prepare release environment:
 

	
 
   1. Switch to the project Python virtual environment::
 

	
 
        workon conntrackt
 

	
 
   2. Set release version, and set issue associated with making the
 
      release::
 

	
 
        NEW_VERSION="MAJOR.MINOR.PATCH"
 
        VERSION="MAJOR.MINOR.PATCH"
 
        ISSUE="CONNT-NUMBER"
 
        BRANCH="${NEW_VERSION%.*}"
 
        BRANCH="${VERSION%.*}"
 

	
 
   3. Verify the information has been set correctly::
 

	
 
        echo "[$ISSUE] $BRANCH -> $NEW_VERSION"
 
        echo "[$ISSUE] $BRANCH -> $VERSION"
 

	
 
3. If this is a new major/minor release, prepare the maintenance
 
   branch:
 

	
 
   .. warning::
 
      Make sure **not** to run these steps when making a patch release!
 

	
 
   1. Create the maintenance branch::
 

	
 
        hg branch "$BRANCH"
 

	
 
   2. Update versioning information in documentation and setup
 
@@ -229,31 +233,31 @@ 7. Push release to PyPI:
 
   1. Tag the release::
 

	
 
        hg tag "$VERSION"
 

	
 
   2. Push the (tested) built source distribution::
 

	
 
        python setup.py upload
 

	
 
8. Clean-up the maintenance branch:
 

	
 
   1. Start a new release notes section in ``docs/releasenotes.rst``::
 

	
 
        sed "/^Release Notes$/{N;s/$/\n\n\n${BRANCH-maint}\n-----------/}" docs/releasenotes.rst
 
        sed -i "/^Release Notes$/{N;s/$/\n\n\n${BRANCH}-maint\n-----------/}" docs/releasenotes.rst
 

	
 
   2. Update versioning information in documentation and setup
 
      script::
 

	
 
        sed -i -e "s/^version = .*/version = '${BRANCH}-maint'/" docs/conf.py
 
        sed -i -e "s/^    version=.*/    version='${BRANC}-maint',/" setup.py
 
        sed -i -e "s/^    version=.*/    version='${BRANCH}-maint',/" setup.py
 

	
 
   3. Fix the title underline for version string in
 
      ``docs/releasenotes.rst``.
 

	
 
   4. Show differences before committing::
 

	
 
        hg diff
 

	
 
   5. Commit the changes::
 

	
 
        hg commit -m "$ISSUE: Bumping version back maintenance."
 

	
 
@@ -264,29 +268,29 @@ 9. Clean-up the default branch if you ha
 
      Make sure **not** to run these steps when making a patch release!
 

	
 
   1. Switch to default development branch::
 

	
 
        hg update default
 

	
 
   2. Verify the switch::
 

	
 
        hg branch
 

	
 
   3. Update versioning information in release notes::
 

	
 
        sed -i -e "s/^dev$/${BRANCH}-maint/" docs/releasenotes.rst
 
        sed -i -e "s/^dev$/${VERSION}/" docs/releasenotes.rst
 

	
 
   4. Start a new release notes section in ``docs/releasenotes.rst``::
 

	
 
        sed "/^Release Notes$/{N;s/$/\n\n\n$dev\n---/}" docs/releasenotes.rst
 
        sed -i "/^Release Notes$/{N;s/\$/\n\n\ndev\n---/}" docs/releasenotes.rst
 

	
 
   5. Fix the title underlines for version strings in
 
      ``docs/releasenotes.rst``.
 

	
 
   6. Show differences before committing::
 

	
 
        hg diff
 

	
 
   7. Commit the changes::
 

	
 
        hg commit -m "$ISSUE: Starting new release notes in default development branch."
 

	
0 comments (0 inline, 0 general)