Difference between revisions of "Version management"

From GeopsyWiki
Jump to navigation Jump to search
Line 69: Line 69:
 
== Creating a new branch ==
 
== Creating a new branch ==
  
We assume that current master branch is 2.1. We want to move master to 2.2
+
We assume that current master branch is 2.1. We want to move master to 2.2. We re-create a complete development tree.
  
 
   mkdir 2.2
 
   mkdir 2.2
Line 75: Line 75:
 
   mv geopsyprojects admin
 
   mv geopsyprojects admin
 
   cp ../2.1/admin/options.sub admin
 
   cp ../2.1/admin/options.sub admin
 +
  # Edit to change destination path
 +
  mkdir -p /usr/local/Geopsy.org/2.2/lib
 
   cp ../2.1/admin/projects.default admin
 
   cp ../2.1/admin/projects.default admin
 
   dpsubconfig -f
 
   dpsubconfig -f
 
   dpsubdo dpstableh
 
   dpsubdo dpstableh
 
   dpsubpro
 
   dpsubpro
 +
  qmake
 
   make
 
   make
  
By default /usr/local/Geopsy.org/2.2/ is the destination path
+
After first successful build, remove the 3rd parties from 2.2.pro file to avoid problems with QtCreator
 +
 
 +
We assume /usr/local/Geopsy.org/2.2/ as the destination path
  
 
   export PATH=/usr/local/Geopsy.org/2.2/bin:$PATH
 
   export PATH=/usr/local/Geopsy.org/2.2/bin:$PATH
 +
 +
Within the previous master tree
 +
 +
  cd 2.1
 +
  dpsubdo cp admin/version-master admin/version-2.1
 +
  dpsubdo git add admin/version-2.1
 +
  dpsubdo git branch 2.1
 +
  dpsubdo dpcheckout 2.1
 +
  dpsubcommit -m "Creating new branch 2.1"
 +
  dpsubpush
 +
  cd admin
 +
  cp admin/version-master admin/version-2.1
 +
  git add admin/version-2.1
 +
  dppush

Revision as of 14:48, 20 May 2009

Versions of projects

Sesarray, the distribution archive, is made of a lot individual applications and libraries that have their own version. Version branches are the same for all items. It is defined at the Sesarray level. Every day changes on all branches are automatically analyzed. Results are directly available in a browser.

Modifications of source code is characterized by its level (script dpversionreport):

  • Level 3: modification of object interface (.h files)
  • Level 2: modification of object implementation (.cpp files)
  • Level 1: currently not used
  • Level 0: no modification

Version numbers are made of three parts: A.B.C

  • A: major modification with drastic changes for the end-user
  • B: major internal modification which breaks binary compatibility (API changed)
  • C: minor bug fixes which ensure binary compatibility (API unchanged). Some functions can be added to object interfaces but existing function definitions are never removed nor modified.

There can be also a release name added after a dash. The most common is '-snapshot-YYMMDD' for unstable development releases. Before producing a snapshot release, versions of individual packets must be increased and committed (not tagged!) according to dpversionreport results.

The summary is an executable bash script that can be used to increment versions of individual applications and libraries. For each modification level, a version increment is labeled B (level 3) or C (level 2). Level 3 may be subject to discussion in case of minor modification of a header file. Modifications on the current stable branch cannot be other that C.

 ######################### geopsy/geopsycore #########################
 OLD_DIR=$(pwd)
 cd gptools/gpsort
 dpversion C
 cd $OLD_DIR

Once this is done for all packets, you can commit the new versions to the repository:

 dpsubdo dpversion c

Do not tag directly before successful testing of the distributed archive.

Snapshots

Set snapshot date to all packets (do this before ./quickpack on the server):

 dpsubdo dpversion S

Commit version change:

 dpsubdo dpversion c

Release production#Quick pack and testing

Merging

First remove all temporary files (especially those generated by previous conflicts):

 dpclean

We merge changes made on a release branch to the development trunk.

 cd sesarray-2.1
 dpsubdo dpcheckout sesarray-2.0
 dpsubpull
 dpsubdo dpcheckout master
 dpsubdo git merge sesarray-2.0

This part must be revised and enlarged when next merge will happen.

Creating a new branch

We assume that current master branch is 2.1. We want to move master to 2.2. We re-create a complete development tree.

 mkdir 2.2
 git clone ssh://USERNAME@geopsy.org/home/git/geopsyprojects
 mv geopsyprojects admin
 cp ../2.1/admin/options.sub admin
 # Edit to change destination path
 mkdir -p /usr/local/Geopsy.org/2.2/lib
 cp ../2.1/admin/projects.default admin
 dpsubconfig -f
 dpsubdo dpstableh
 dpsubpro
 qmake
 make

After first successful build, remove the 3rd parties from 2.2.pro file to avoid problems with QtCreator

We assume /usr/local/Geopsy.org/2.2/ as the destination path

 export PATH=/usr/local/Geopsy.org/2.2/bin:$PATH

Within the previous master tree

 cd 2.1
 dpsubdo cp admin/version-master admin/version-2.1
 dpsubdo git add admin/version-2.1
 dpsubdo git branch 2.1
 dpsubdo dpcheckout 2.1
 dpsubcommit -m "Creating new branch 2.1"
 dpsubpush
 cd admin
 cp admin/version-master admin/version-2.1
 git add admin/version-2.1
 dppush