Difference between revisions of "Documentation/4.1/Developers/Versioning"

From Slicer Wiki
Jump to: navigation, search
(Prepend documentation/versioncheck template. See http://na-mic.org/Mantis/view.php?id=2887)
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Documentation/Versioning|Documentation]]←
+
<noinclude>{{documentation/versioncheck}}</noinclude>
 +
= How to create a Slicer package=
 +
== locally on your machine ==
 +
After Slicer correctly build and test, to create a binary package on mac/unix:
 +
$ cd Slicer-Superbuild/Slicer-build
 +
$ make package
 +
For Visual Studio on Windows, the inner Slicer (not superbuild) solution file contains a 'PACKAGE' project, just build it. You might have to install [http://nsis.sourceforge.net/Download NSIS] prior.
  
{{ambox|text=This page describe the Slicer versioning scheme}}
+
On Mac OS X, a 'dmg' file is generated, on unix it's a tar.gz archive and on Windows it's a exe installer.
 +
== automatically expose it to the Slicer community
 +
CTest can automatically create a package and upload it on [http://slicer.cdash.org slicer.cdash.org] and [http://download.slicer.org download.slicer.org] to be available to the community.
 +
You need to create a script following the template [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/CMake/SlicerDashboardScript.TEMPLATE.cmake?view=markup Slicer/CMake/SlicerDashboardScript.TEMPLATE.cmake]. Change the following variables <code>WITH_PACKAGES</code> to <code>TRUE</code> and <code>SCRIPT_MODE</code> to <code>experimental</code>
  
 +
Then you can run your script:
 +
$ ctest -S /path/to/SlicerPackagecript.cmake -VV > /path/to/logs.txt 2>&1
  
{{ambox
+
Please note that the source and build directories should not be located in '''/usr'''. The libraries would be considered by the packaging mechanism as "system" libraries.
| type  = protection
 
| image = [[File:InProgress.png|40px|alt=Work in progress]]
 
| text  = Page under construction.
 
}}
 
  
= Package naming scheme =
+
= Slicer Package naming scheme =
 +
{{ambox|text=The following information is for Slicer maintainers only}}
  
<pre>Slicer-&lt;MAJOR_VERSION&gt;.&lt;MINOR_VERSION&gt;.&lt;BUILD_VERSION&gt;-&lt;[svn&lt;REV&gt;[-dirty]|rc{1|2|3...}|(null)]&gt;-&lt;DATE&gt;-&lt;ARCH&gt;-&lt;PLATFORM&gt;</pre>
+
<pre>Slicer-&lt;MAJOR_VERSION&gt;.&lt;MINOR_VERSION&gt;.&lt;PATCH_VERSION&gt;[-rc{1|2|3...}][-&lt;TWEAK_VERSION&gt;][-&lt;DATE&gt;][-svn&lt;REV&gt;][-dirty]-&lt;ARCH&gt;-&lt;PLATFORM&gt;</pre>
  
We can distinguish between two stages:
+
There are 2 types of builds, releases and developments:
* Development: The suffix '''svn&lt;REV&gt;''' allows to identify the revision associated with the current package. The '''-dirty''' prefix indicates if the package has been generated from a locally modified source tree.
+
; Release
 +
: Special builds made on a given revision (e.g. r19033: "ENH: Slicer 4.0.1")
 +
: Don't contain date or revision number.
 +
: The optional suffix '''-rc{1|2|3|...}''' identifies the release candidates leading to a final release.
 +
: Eventually, a tweak number can be added (e.g. 4.0.1-1)
 +
; Development
 +
: Nightly or experimental builds
 +
: Contains suffixes after the major.minor.patch version
 +
: The suffix '''svn&lt;REV&gt;''' allows to identify the revision associated with the current package.
 +
: The '''-dirty''' prefix indicates if the package has been generated from a locally modified source tree.
  
* Release: The optional suffix '''rc{1|2|3|...}''' allows to identify the different release candidates leading to a final release.
+
== Example of linux 64bits packages ==
 +
[              File name              ][  date  ][ build type ][                      note                    ]
 +
Slicer-4.0.0-linux-amd64                2011-11-24    release    release of Slicer 4.0.0
 +
Slicer-4.0.0-2011-12-10-linux-amd64      2011-11-25  development  nightly build after 4.0.0
 +
Slicer-4.0.1-rc1-linux-amd64            2012-01-04    release    release candidate 1 of Slicer 4.0.1
 +
Slicer-4.0.1-rc1-2012-01-05-linux-amd64  2012-01-05  development  nightly build after the release candidate
 +
Slicer-4.0.1-rc2-linux-amd64            2012-01-11    release    release candidate 2 of Slicer 4.0.1
 +
Slicer-4.0.1-rc2-2012-01-12-linux-amd64  2012-01-12  development  nightly build after the release candidate
 +
Slicer-4.0.1-linux-amd64                2012-01-14    release    release of Slicer 4.0.1
 +
Slicer-4.0.1-2012-01-20-linux-amd64      2012-01-20  development  nightly build after 4.0.1
 +
Slicer-4.0.1-1-linux-amd64              2012-01-28    release     tweak version 1 of Slicer 4.0.1
 +
Slicer-4.0.2-linux.amd64                2012-06-05    release    release of Slicer 4.0.2
  
Example of linux packages chronologically ordered:
+
= Extension package - Naming scheme =
[  date  ] File name                                      [  build type ]
+
{{documentation/underconstruction}}
[2011-12-09] Slicer-4.0.0-linux-amd64                      [final release]
+
= To do when versioning =
[2011-12-10] Slicer-4.0.1-svn18872-2011-12-10-linux-amd64  [ development ]
+
== At feature freeze (~1 month before release)==
[2011-12-11] Slicer-4.0.1-svn18883-2011-12-11-linux-amd64  [ development ]
+
* Create Slicer-4.[X+1] branch in SlicerVTK
[2011-12-12] Slicer-4.0.1-svn18894-2011-12-12-linux-amd64  [ development ]
+
** Make sure all commits are backported into VTK.
...
+
** Start from official VTK release branch or trunk (not recommanded)
[2011-12-31] Slicer-4.0.1-svn18894-2011-12-12-linux-amd64  [ development ]
+
** Try slicer with no Slicer.ini
[2011-01-01] Slicer-4.0.2-rc1-linux-amd64                  [  release   ]
 
[2011-01-02] Slicer-4.0.1-svn19010-2012-01-02-linux-amd64  [ development ]
 
[2011-01-03] Slicer-4.0.1-svn19011-2012-01-03-linux-amd64  [ development ]
 
[2011-01-04] Slicer-4.0.2-rc2-linux-amd64                  [  release  ]
 
[2011-01-05] Slicer-4.0.1-svn19021-2012-01-05-linux-amd64  [ development ]
 
...
 
[2011-01-08] Slicer-4.0.2-rc3-linux-amd64                  [  release   ]
 
[2011-01-09] Slicer-4.0.1-svn19023-2012-01-09-linux-amd64  [ development ]
 
[2011-01-10] Slicer-4.0.2-linux-amd64                      [final release]
 
[2011-01-11] Slicer-4.0.3-svn19028-2012-01-10-linux-amd64  [ development ]
 
[2011-01-12] Slicer-4.0.3-svn19035-2012-01-11-linux-amd64  [ development ]
 
  
CMake example:
+
== pre release & release ==
[  date  ] File name                                      [ build type  ]
+
* Update modules documentation link in help section (loadable, scripted and cli)
[2011-12-09] Slicer-4.0.0-linux-amd64                      [final release]
+
** And some html links in Welcome module (Modules/Loadable/SlicerWelcome/Resources/HTML)
[2011-12-09] Slicer-4.0.0-2011-12-09-linux-amd64            [ development ]
+
* Release commit with message: "ENH: Slicer 4.X.Y"
[2011-12-10] Slicer-4.0.0-2011-12-10-linux-amd64            [ development ]
+
** In '''Slicer4/CMakeLists.txt''', update <code>Slicer_VERSION_MAJOR</code>, <code>Slicer_VERSION_MINOR</code>, <code>Slicer_VERSION_PATCH</code>. Uncomment and set <code>Slicer_VERSION_TWEAK</code> to 0, <code>Slicer_VERSION_RC</code>...
[2011-12-11] Slicer-4.0.0-2011-12-11-linux-amd64            [ development ]
+
* commit with message: "ENH: Begin post-4.X.Y development"
[2011-12-19] Slicer-4.0.0-2011-12-19-linux-amd64            [ development ]
+
** In '''Slicer4/CMakeLists.txt''', comment <code>Slicer_VERSION_TWEAK</code> so the next builds will contain the day of build.
[2011-12-20] Slicer-4.0.1-rc1-linux-amd64                  [  release   ]
 
[2011-12-21] Slicer-4.0.1-rc1-linux-amd64                  [ development ]
 
[2011-12-22] Slicer-4.0.1-rc1-linux-amd64                  [ development ]
 
...
 
[2011-12-25] Slicer-4.0.1-rc1-linux-amd64                  [ development ]
 
[2011-12-26] Slicer-4.0.1-rc2-linux-amd64                  [  release  ]
 
[2011-12-27] Slicer-4.0.1-rc2-linux-amd64                  [ development ]
 
...
 
[2011-12-29] Slicer-4.0.1-rc2-linux-amd64                  [ development ]
 
[2011-12-30] Slicer-4.0.1-rc3-linux-amd64                  [  release  ]
 
[2011-12-31] Slicer-4.0.1-rc3-linux-amd64                  [ development ]
 
...
 
[2012-01-02] Slicer-4.0.1-rc3-linux-amd64                  [ development ]
 
[2012-01-03] Slicer-4.0.1-linux-amd64                      [final release]
 
[2012-01-03] Slicer-4.0.1-2011-12-19-linux-amd64            [ development ]
 
[2012-01-04] Slicer-4.0.1-2011-12-19-linux-amd64            [ development ]
 
Optionally, a tweak version can happen:
 
[2012-01-12] Slicer-4.0.1.1-linux-amd64                    [final release]
 
...
 
[2011-04-10] Slicer-4.0.2-rc1-linux-amd64                  [  release  ]
 
...
 
Notes/problems:
 
- no date to differentiate release candidates from each others
 
- release packages are not nightly builds, but manual builds
 
  
= Extension package - Naming scheme =
+
== post release ==
 +
* Package machines
 +
** switch to branch (make sure at least you are on trunk otherwise)
 +
*** <code>svn switch http://svn.slicer.org/Slicer4/branches/Slicer-4-1-QtTesting</code>
 +
** update source to release revision
 +
*** <code>cd Slicer; svn update -r19609</code>
 +
** delete build directory to force rebuild
 +
*** <code>cd Slicer-package; rm -rf *</code>
 +
** build, package and upload with cmake
 +
*** <code>cd DashboardScripts; ./factory-make-package.sh</code>
 +
*** make sure LEGACY CLIs is ON, EMSegment needs BSplineToDeformationField.
 +
* Generate ChangeLog using [https://raw.github.com/cryos/avogadro/master/scripts/gitlog2changelog.py gitlog2changelog.py]. More details [http://blog.cryos.net/archives/202-Git-and-Automatic-ChangeLog-Generation.html here] .
 +
* Update [[Release Details]] page using generated ChangeLog
 +
* In Mantis
 +
** "Release" current target
 +
** Create new target
 +
** Check the "fixed in" fields
 +
* Update more recent version on external links:
 +
** on slicer wikipedia article

Latest revision as of 07:26, 14 June 2013

Home < Documentation < 4.1 < Developers < Versioning


For the latest Slicer documentation, visit the read-the-docs.


How to create a Slicer package

locally on your machine

After Slicer correctly build and test, to create a binary package on mac/unix:

$ cd Slicer-Superbuild/Slicer-build
$ make package

For Visual Studio on Windows, the inner Slicer (not superbuild) solution file contains a 'PACKAGE' project, just build it. You might have to install NSIS prior.

On Mac OS X, a 'dmg' file is generated, on unix it's a tar.gz archive and on Windows it's a exe installer. == automatically expose it to the Slicer community CTest can automatically create a package and upload it on slicer.cdash.org and download.slicer.org to be available to the community. You need to create a script following the template Slicer/CMake/SlicerDashboardScript.TEMPLATE.cmake. Change the following variables WITH_PACKAGES to TRUE and SCRIPT_MODE to experimental

Then you can run your script:

$ ctest -S /path/to/SlicerPackagecript.cmake -VV > /path/to/logs.txt 2>&1

Please note that the source and build directories should not be located in /usr. The libraries would be considered by the packaging mechanism as "system" libraries.

Slicer Package naming scheme

Slicer-<MAJOR_VERSION>.<MINOR_VERSION>.<PATCH_VERSION>[-rc{1|2|3...}][-<TWEAK_VERSION>][-<DATE>][-svn<REV>][-dirty]-<ARCH>-<PLATFORM>

There are 2 types of builds, releases and developments:

Release
Special builds made on a given revision (e.g. r19033: "ENH: Slicer 4.0.1")
Don't contain date or revision number.
The optional suffix -rc{1|2|3|...} identifies the release candidates leading to a final release.
Eventually, a tweak number can be added (e.g. 4.0.1-1)
Development
Nightly or experimental builds
Contains suffixes after the major.minor.patch version
The suffix svn<REV> allows to identify the revision associated with the current package.
The -dirty prefix indicates if the package has been generated from a locally modified source tree.

Example of linux 64bits packages

[              File name               ][   date   ][ build type ][                      note                     ]
Slicer-4.0.0-linux-amd64                 2011-11-24    release     release of Slicer 4.0.0
Slicer-4.0.0-2011-12-10-linux-amd64      2011-11-25  development   nightly build after 4.0.0
Slicer-4.0.1-rc1-linux-amd64             2012-01-04    release     release candidate 1 of Slicer 4.0.1
Slicer-4.0.1-rc1-2012-01-05-linux-amd64  2012-01-05  development   nightly build after the release candidate
Slicer-4.0.1-rc2-linux-amd64             2012-01-11    release     release candidate 2 of Slicer 4.0.1
Slicer-4.0.1-rc2-2012-01-12-linux-amd64  2012-01-12  development   nightly build after the release candidate
Slicer-4.0.1-linux-amd64                 2012-01-14    release     release of Slicer 4.0.1
Slicer-4.0.1-2012-01-20-linux-amd64      2012-01-20  development   nightly build after 4.0.1
Slicer-4.0.1-1-linux-amd64               2012-01-28    release     tweak version 1 of Slicer 4.0.1
Slicer-4.0.2-linux.amd64                 2012-06-05    release     release of Slicer 4.0.2

Extension package - Naming scheme


To do when versioning

At feature freeze (~1 month before release)

  • Create Slicer-4.[X+1] branch in SlicerVTK
    • Make sure all commits are backported into VTK.
    • Start from official VTK release branch or trunk (not recommanded)
    • Try slicer with no Slicer.ini

pre release & release

  • Update modules documentation link in help section (loadable, scripted and cli)
    • And some html links in Welcome module (Modules/Loadable/SlicerWelcome/Resources/HTML)
  • Release commit with message: "ENH: Slicer 4.X.Y"
    • In Slicer4/CMakeLists.txt, update Slicer_VERSION_MAJOR, Slicer_VERSION_MINOR, Slicer_VERSION_PATCH. Uncomment and set Slicer_VERSION_TWEAK to 0, Slicer_VERSION_RC...
  • commit with message: "ENH: Begin post-4.X.Y development"
    • In Slicer4/CMakeLists.txt, comment Slicer_VERSION_TWEAK so the next builds will contain the day of build.

post release

  • Package machines
    • switch to branch (make sure at least you are on trunk otherwise)
    • update source to release revision
      • cd Slicer; svn update -r19609
    • delete build directory to force rebuild
      • cd Slicer-package; rm -rf *
    • build, package and upload with cmake
      • cd DashboardScripts; ./factory-make-package.sh
      • make sure LEGACY CLIs is ON, EMSegment needs BSplineToDeformationField.
  • Generate ChangeLog using gitlog2changelog.py. More details here .
  • Update Release Details page using generated ChangeLog
  • In Mantis
    • "Release" current target
    • Create new target
    • Check the "fixed in" fields
  • Update more recent version on external links:
    • on slicer wikipedia article