Difference between revisions of "Version management"
(32 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | == Versions of projects == | |
− | + | The distribution archive, is made of a lot individual applications and libraries that have their own version. Branches are either stable, testing or devel. Every day changes on all branches are automatically analyzed. Results are directly available in a browser [http://www.geopsy.org/versions here]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
Modifications of source code is characterized by its level (script dpversionreport): | Modifications of source code is characterized by its level (script dpversionreport): | ||
Line 15: | Line 10: | ||
* Level 0: no modification | * Level 0: no modification | ||
− | Version numbers are made of three parts: A.B.C | + | Version numbers are made of three parts: A.B.C. |
− | + | Report of recent modifications and suggestions for version change is available at http://www.geopsy.org/versions. Projects listed in user, restricted and linux are processed. For the other groups run the report manually: | |
− | |||
− | |||
− | There can be also a release name added after a dash. The most common is '-snapshot-YYMMDD' for unstable development releases. | + | dpsubdo -l install dpversionreport |
+ | |||
+ | Version reporting is currently linked to compilation factory. It might change in the future to report all projects, including more private ones. | ||
+ | |||
+ | ===Version model for applications and plugins=== | ||
+ | |||
+ | * A: major modifications with drastic changes for the end-user | ||
+ | * B: minor modifications for the end-user | ||
+ | * C: minor bug fixes almost invisible for the end-user | ||
+ | |||
+ | ===Version model for shared libraries=== | ||
+ | |||
+ | * A: major modifications of the API: compatibility with old codes is not guaranteed. | ||
+ | * B: minor modifications of the API: some classes or functions were added, inline functions were modified, arguments were added with default values to keep compatibility with old codes. In other words, old codes can still be compiled without modification but binary compatibility is not guaranteed. | ||
+ | * C: minor revision: API is not modified and binary compatibility is guaranteed. Classes or functions can still be added but inline status or inline contents cannot be modified. Number of arguments cannot be changed. Class members cannot be modified. | ||
+ | |||
+ | There can be also a release name added after a dash. The most common is '-snapshot-YYMMDD' for unstable development releases. In such case, version is labeled as 0.0.0. | ||
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. | 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. | ||
Line 34: | Line 43: | ||
dpsubdo dpversion c | dpsubdo dpversion c | ||
+ | dpsubdo dpversion t | ||
+ | |||
+ | Tagging is mandatory for proper version reporting. Do not tag nor change version before a successful test of the distributed archive. | ||
+ | |||
+ | == Version of project list == | ||
+ | |||
+ | cd admin | ||
+ | dversion s | ||
+ | |||
+ | Eventually, set a snapshot version: | ||
+ | |||
+ | dpversion S | ||
+ | |||
+ | commit the new versions to the repository: | ||
+ | |||
+ | dpversion c | ||
+ | |||
+ | == 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#Tagging]] | ||
+ | |||
+ | == Merging == | ||
+ | |||
+ | First remove all temporary files (especially those generated by previous conflicts): | ||
+ | |||
+ | dpclean | ||
+ | |||
+ | We merge changes made on a devel branch to the testing branch. Make sure that all modification are committed (also in admin) | ||
+ | |||
+ | cd testing | ||
+ | dpsubcommit | ||
+ | dpsubpush | ||
+ | cd admin | ||
+ | dpcommit | ||
+ | dppush | ||
+ | cd .. | ||
+ | |||
+ | We start by merging admin directory | ||
+ | |||
+ | cd admin | ||
+ | dpcheckout devel | ||
+ | dppull | ||
+ | dpcheckout testing | ||
+ | git merge devel | ||
+ | cd .. | ||
+ | |||
+ | For all project for which the testing branch does not exist, it is better to switch temporarily the default branch to devel instead of testing (reset afterwards). | ||
+ | |||
+ | cd admin | ||
+ | dpcheckout devel | ||
+ | cd .. | ||
+ | dpsubdo dpcheckout devel | ||
+ | dpsubpull | ||
+ | cd admin | ||
+ | dpcheckout testing | ||
+ | |||
+ | Then merging itself | ||
+ | |||
+ | dpsubdo dpcheckout testing | ||
+ | dpsubdo git merge devel | ||
+ | dpsubpro | ||
+ | dpsubconfig -g | ||
+ | |||
+ | == Creating a new branch == | ||
+ | |||
+ | We assume that the current branch is 3.5. We want to create 3.6. First duplicate the source and build trees: | ||
+ | |||
+ | cp -r 3.5 3.5 | ||
+ | cp -r builds/3.5 builds/3.6 | ||
+ | |||
+ | In each subdirs of builds/3.6, rename .pro file and edit .devpro_build_base | ||
+ | |||
+ | mv 3.5.pro 3.6.pro | ||
+ | rm *.pro.user | ||
+ | cat .devpro_build_base | sed "s/3.5/3.6/" > tmp; mv tmp .devpro_build_base | ||
+ | |||
+ | Add 3.6 to the list of branches in build scripts (configure, make,...). Eventually keep only 3.6 for running the following operations. | ||
+ | |||
+ | cd builds | ||
+ | ./configureall -d | ||
+ | |||
+ | Go to any build directory to create configure-3.6 in sources and to create the branch in git: | ||
+ | |||
+ | cd builds/3.6/Qt-6.5/Debug | ||
+ | dpsubdo cp configure-3.5 configure-3.6 | ||
+ | dpsubdo git branch 3.6 | ||
+ | dpsubdo git checkout 3.6 | ||
+ | dpsubdo cp admin/version-3.5 admin/version-3.6 | ||
+ | dpsubdo git add configure-3.6 admin/version-3.6 | ||
+ | cdsrc | ||
+ | cd admin | ||
+ | git branch 3.6 | ||
+ | git checkout 3.6 | ||
+ | cp admin/version-3.5 admin/version-3.6 | ||
+ | git add admin/version-3.6 | ||
+ | popd | ||
+ | |||
+ | Update version headers (to run manually in each build directory) | ||
+ | |||
+ | cd builds/3.6/Qt-6.5/Debug | ||
+ | dpsubdo dpversion f | ||
+ | dpsubpro | ||
+ | qmake | ||
+ | |||
+ | Run configure and make | ||
− | + | cd builds | |
+ | ./configureall | ||
+ | ./makeall |
Latest revision as of 09:46, 23 January 2024
Contents
Versions of projects
The distribution archive, is made of a lot individual applications and libraries that have their own version. Branches are either stable, testing or devel. Every day changes on all branches are automatically analyzed. Results are directly available in a browser here.
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.
Report of recent modifications and suggestions for version change is available at http://www.geopsy.org/versions. Projects listed in user, restricted and linux are processed. For the other groups run the report manually:
dpsubdo -l install dpversionreport
Version reporting is currently linked to compilation factory. It might change in the future to report all projects, including more private ones.
Version model for applications and plugins
- A: major modifications with drastic changes for the end-user
- B: minor modifications for the end-user
- C: minor bug fixes almost invisible for the end-user
- A: major modifications of the API: compatibility with old codes is not guaranteed.
- B: minor modifications of the API: some classes or functions were added, inline functions were modified, arguments were added with default values to keep compatibility with old codes. In other words, old codes can still be compiled without modification but binary compatibility is not guaranteed.
- C: minor revision: API is not modified and binary compatibility is guaranteed. Classes or functions can still be added but inline status or inline contents cannot be modified. Number of arguments cannot be changed. Class members cannot be modified.
There can be also a release name added after a dash. The most common is '-snapshot-YYMMDD' for unstable development releases. In such case, version is labeled as 0.0.0.
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 dpsubdo dpversion t
Tagging is mandatory for proper version reporting. Do not tag nor change version before a successful test of the distributed archive.
Version of project list
cd admin dversion s
Eventually, set a snapshot version:
dpversion S
commit the new versions to the repository:
dpversion c
Snapshots
Set snapshot date to all packets (do this before ./quickpack on the server):
dpsubdo dpversion S
Commit version change:
dpsubdo dpversion c
Merging
First remove all temporary files (especially those generated by previous conflicts):
dpclean
We merge changes made on a devel branch to the testing branch. Make sure that all modification are committed (also in admin)
cd testing dpsubcommit dpsubpush cd admin dpcommit dppush cd ..
We start by merging admin directory
cd admin dpcheckout devel dppull dpcheckout testing git merge devel cd ..
For all project for which the testing branch does not exist, it is better to switch temporarily the default branch to devel instead of testing (reset afterwards).
cd admin dpcheckout devel cd .. dpsubdo dpcheckout devel dpsubpull cd admin dpcheckout testing
Then merging itself
dpsubdo dpcheckout testing dpsubdo git merge devel dpsubpro dpsubconfig -g
Creating a new branch
We assume that the current branch is 3.5. We want to create 3.6. First duplicate the source and build trees:
cp -r 3.5 3.5 cp -r builds/3.5 builds/3.6
In each subdirs of builds/3.6, rename .pro file and edit .devpro_build_base
mv 3.5.pro 3.6.pro rm *.pro.user cat .devpro_build_base | sed "s/3.5/3.6/" > tmp; mv tmp .devpro_build_base
Add 3.6 to the list of branches in build scripts (configure, make,...). Eventually keep only 3.6 for running the following operations.
cd builds ./configureall -d
Go to any build directory to create configure-3.6 in sources and to create the branch in git:
cd builds/3.6/Qt-6.5/Debug dpsubdo cp configure-3.5 configure-3.6 dpsubdo git branch 3.6 dpsubdo git checkout 3.6 dpsubdo cp admin/version-3.5 admin/version-3.6 dpsubdo git add configure-3.6 admin/version-3.6 cdsrc cd admin git branch 3.6 git checkout 3.6 cp admin/version-3.5 admin/version-3.6 git add admin/version-3.6 popd
Update version headers (to run manually in each build directory)
cd builds/3.6/Qt-6.5/Debug dpsubdo dpversion f dpsubpro qmake
Run configure and make
cd builds ./configureall ./makeall