Changes between Version 16 and Version 17 of pm-svn-releases


Ignore:
Timestamp:
Jun 28, 2007 4:43:00 PM (13 years ago)
Author:
andreasw
Comment:

added description on how to use the release creation scripts

Legend:

Unmodified
Added
Removed
Modified
  • pm-svn-releases

    v16 v17  
    9191Typically, you would have a version of your code in a stable branch, say {{{stable/2.3/}}}, which you now want to make an official release.  '''Remember, it is mandatory that one can recreate exactly the same version in the future''', ''i.e.'', you should not change anything in a point release after you set it up.
    9292
    93 '''If you are using [wiki:pm-svn-externals Externals]''':  Before creating the new release from the current version in the stable branch, '''you need to make sure that all {{{svn:externals}}}, in the version that you want to make the release, are pointing to ''releases'' of the dependencies''' so that your release can be recreated exactly at any point in time, independent of continuing development of the dependencies.  Please make sure that all URLs in your {{{Externals}}} file are pointing to something in the {{{release}}} directory of each dependency.  Also, make sure that the {{{svn:externals}}} property is indeed set according to the file content (verify with, ''e.g.'', {{{svn pget svn:externals https://projects.coin-or.org/svn/YourProject/stable/2.3}}}).  (Note: If for some reason a compatible release for a dependency does not exist, you must specify the subversion revision number, using the "{{{-r}}}" flag in the {{{externals}}} definition.)  '''Please use the [wiki:pm-svn-externals#PreparingExternalsForAPointReleaseexternals checklist] to make sure things work properly.'''
     93The {{{BuildTools}}} provide two convenient scripts that make it easy for you to create a new release from a stable branch.  In case you are using [wiki:pm-svn-externals Externals], you need to be using only references to externals in ''stable'' branches of other projects.
    9494
    95 To create a new release, say 2.3.8, you use the {{{svn copy}}} command:
     95The first script, {{{BuildTools/prepare_new_release}}}, does the following things for you:
     96
     97 * automatically determines the next release number
     98 * checks out a clean copy of the stable version specified
     99 * updates the externals to point to the latest releases in the dependencies (for the same stable branch as specified in the Externals file)
     100 * updates the version number in your configure.ac files
     101 * receives the code for the externals
     102 * uses the "get.*" scripts to download !ThirdParty code (if there are any)
     103 * reruns the autotools
     104 * checks if all dependencies are using the same version of the !BuildTools
     105 * runs the configure script and compiles the code
     106 * runs the unit test
     107
     108If any of those steps fail, you need to correct the errors first before you can continue.  It is a good idea to have a good look at the output of the compilation and unit test, even if no errors are reported.
     109
     110Once there are no errors and you are happy with what you saw in the output, you can use the {{{commit_new_release}}} script to commit the new release to the repository.  This second script will do the following:
     111
     112 * temporarily commits the modified local copy of your stable branch to the repository (including externals pointing to release versions of the dependencies)
     113 * creates the new release by copying the temporarily committed stable branch to a new {{{releases/x.y.z}}} directory in the repository
     114 * restores the previous definition of the externals in your stable branch and commits the restored stable branch to the repository
     115
     116Here an example:  Assume, that in your project {{{YourProject}}} you have a stable branch {{{stable/2.3}}} from which you want to make a new release.  In a shell, go into a temporary directory and type:
    96117
    97118{{{
    98 svn copy https://projects.coin-or.org/svn/YourProject/stable/2.3 \
    99            https://projects.coin-or.org/svn/YourProject/releases/2.3.8 \
    100            -m "Creating new release 2.3.8 from stable/2.3 (rev 567)"
     119/path/to/your/local/copy/BuildTools/prepare_new_release YourProject/stable/2.3
    101120}}}
    102121
    103 Again, it is a very good idea to log the subversion repository revision number in the commit message.
     122As you see, the specified argument is simple the last part of the URL in the repository, i.e., the stuff that comes after {{{https://projects.coin-or.org/svn/}}}.
     123
     124This will run for a while (you need to be connected to the network, of course).  If everything works fine, you will see something like:
     125
     126{{{
     127===> ALL TESTS PASSED
     128
     129Please review the output above, particularly the one of make test
     130
     131Also, please check the Externals:
     132BuildTools  https://projects.coin-or.org/svn/BuildTools/releases/0.5.13
     133...
     134
     135After reviewing the output above, you can create a new release by going into
     136the directory
     137
     138          /path/to/tempdir/tmp_checkout
     139
     140and run the commit_new_release script
     141}}}
     142
     143Just follow the instructions (use the {{{commit_new_release}}} script that is in the same directory as the {{{prepare_new_release}}} script you just ran.
     144
    104145
    105146== Tarball Creation ==