packageinfo.sh revision 330141
1238730Sdelphij#
2330571Sdelphij# packageinfo.sh - set shell variables with version components
3238730Sdelphij#
4238730Sdelphij# This file is sourced by other scripts and does not need execute
5238730Sdelphij# permission or the #! shell selector.
6238730Sdelphij#
7238730Sdelphij# Most changes to this file are fully or semi-automated using the
8238730Sdelphij#   UpdatePoint script on the ntp.org tarball build machine.  Changes
960786Sps#   required by the typical ntp.org release sequences are below.
1060786Sps#
1160786Sps## DEV:
1260786Sps#
1360786Sps# To bump the -dev point (p) number, UpdatePoint needs no changes here.
1460786Sps#
1560786Sps# To start a -RC cycle in -dev leading to the next -stable release,
1660786Sps#   set prerelease=rc.
1760786Sps#
1860786Sps# To move from dev -RC to new -stable and -dev major/minor version, set
1960786Sps#   minor and/or major to the new version, repotype to match the new
2060786Sps#   minor version, empty prerelease, and set point=NEW.  UpdatePoint
2160786Sps#   will empty point and rcpoint, and set betapoint=0.
2260786Sps#
2360786Sps## STABLE:
2460786Sps#
2560786Sps# To start a -stable beta cycle, which normally occurs before a -stable
2660786Sps#   -RC1 during the runup to a -stable point release, UpdatePoint needs
2760786Sps#   no changes here.  Both betapoint and point will be incremented, and
2860786Sps#   prerelease will be set to beta.
2960786Sps#
3060786Sps# To move on from -stable beta to RC set prerelease=rc.
3160786Sps#
3260786Sps# To fall back from -stable RC to beta set prerelease=beta.
3360786Sps#
3460786Sps# To skip over -stable beta1 directly to -RC1, set prerelease=rc.
3560786Sps#
36161475Sdelphij# To skip all -stable prereleases and move from one primary or point 
3760786Sps#   release directly to the next point release, set rcpoint=GO.
3860786Sps#
3960786Sps##
4060786Sps#
4160786Sps# To see what UpdatePoint will do without modifying packageinfo.sh as it
4260786Sps# does by default, use the -t/--test option before the repo type:
4360786Sps#
4460786Sps# shell# scripts/build/UpdatePoint -t stable
4560786Sps#
4660786Sps
4760786Sps# repotype must be stable or dev
4860786Spsrepotype=stable
4960786Sps
5060786Sps# post-4.2.8:
5160786Sps# version=Major.Minor
5260786Sps# 4.2.8 and before:
5360786Sps# version=Protocol.Major.Minor
5460786Sps# odd minor numbers are for -dev, even minor numbers are for -stable
5560786Sps# UpdatePoint will fail if repotype is inconsistent with minor.
5660786Spsproto=4
5760786Spsmajor=2
5860786Spsminor=8
5960786Sps
6060786Spscase "${proto}.${major}" in
6160786Sps 4.[012])
6260786Sps    version=${proto}.${major}.${minor}
6360786Sps    ;;
6460786Sps *) version=${major}.${minor}
6560786Sps    ;;
6660786Spsesac
6760786Sps
6860786Sps# Special.  Normally unused.  A suffix.
6960786Sps#special=ag
7060786Spsspecial=
7160786Sps
7260786Sps# prerelease can be empty, 'beta', or 'rc'.
7360786Spsprerelease=
7460786Sps
7560786Sps# ChangeLog starting tag (see also CommitLog-4.1.0)
7660786SpsCLTAG=NTP_4_2_0
7760786Sps
7860786Sps### post-4.2.8:
7960786Sps### Point number, after "major.minor.", normally modified by script.
8060786Sps### 4.2.8 and before:
81237613Sdelphij### Point number, after "p", normally modified by script.
8260786Sps# 3 cases:
8360786Sps# - Numeric values increment
8460786Sps# - empty 'increments' to 1
8560786Sps# - NEW 'increments' to empty
8660786Spspoint=11
8760786Sps
8860786Sps### betapoint is normally modified by script.
8960786Sps# ntp-stable Beta number (betapoint)
9060786Sps# Should be zeroed at release, and left at zero until first beta.
9160786Sps# The first beta is -beta1.
9260786Sps# betapoint is always zero in ntp-dev.
9360786Spsbetapoint=
9460786Sps
9560786Sps### rcpoint is normally modified by script except for GO.
9660786Sps# RC number (rcpoint)
97330571Sdelphij# for ntp-dev, always empty as RC numbers are not used, nor is GO.
98330571Sdelphij# For ntp-stable:
9960786Sps# if prerelease is 'rc':
10060786Sps# - Numeric values increment
101330571Sdelphij# - GO triggers a release
102330571Sdelphij# - - rcpoint is emptied
10360786Sps# - - betapoint is set to 0
10460786Sps# - - prerelease is emptied
10560786Sps# else (not in RC)
10660786Sps# - rcpoint is empty and unused (for now).
10760786Spsrcpoint=
10860786Sps