devel-versioning.rst
changeset 1003 4b8b3daac0db
parent 950 06221010c81d
child 1004 5c81d5c1120a
equal deleted inserted replaced
1002:234cd58cae56 1003:4b8b3daac0db
     1 =================
     1 =================
     2  Version format.
     2  Version format.
     3 =================
     3 =================
     4 .. contents::
     4 .. contents::
       
     5 
       
     6 Feature set versioning.
       
     7 =======================
       
     8 
       
     9 Feature set versioning pretend to show how serious changes made according to
       
    10 feature availability and how compatible these versions.
       
    11 
       
    12 Marketing versioning.
       
    13 =====================
       
    14 
       
    15 Marketing versioning schema used for marketing, advertising purpose. It is
       
    16 usually inconsistent and can changed over the time.
       
    17 
       
    18 Examples of marketing version schema:
       
    19 
       
    20  * Years.
       
    21  * Ancient gods.
       
    22  * Star/satellite/galactic names.
       
    23 
       
    24 Look thread for GDB:
       
    25 
       
    26   http://www.cygwin.com/ml/gdb/2007-07/msg00061.html
       
    27 
       
    28 There discussed:
       
    29 
       
    30  * Is it essential to update major version if significant change made for
       
    31    licence? Answer: NO!
       
    32 
       
    33    GPLv3 is a big deal spread out over the whole GNU project, but not a big deal
       
    34    for GDB in particular.
       
    35  * Is it right follow date version schema regardless major changes? Answer: NO!
       
    36 
       
    37    Many OS distribution encode year in versions but versions does not present
       
    38    featureset but package set instead.
       
    39 
       
    40 Year as version name.
       
    41 ---------------------
       
    42 
       
    43 If year used as version some people can decide that 2005 is too old and broken
       
    44 if it used in 2007. So companies release product by leading year number. So in
       
    45 2007 they release 2008 version.
       
    46 
       
    47 Version name components.
       
    48 ========================
       
    49 
       
    50  * major
       
    51  * minor
       
    52  * patch (patchlevel), micro
       
    53  * rev (revision)
       
    54  * build
       
    55  * date
       
    56 ::
       
    57 
       
    58   major.minor.rev
       
    59   major.minor.rev.build
       
    60   major.current.age
       
    61 
       
    62 Major version component.
       
    63 ------------------------
       
    64 
       
    65 Major number change means that the new version is incompatible with the old one
       
    66 and any dependent of the prior version will require code changes to upgrade to
       
    67 the new package.
       
    68 
       
    69 Minor version component.
       
    70 ------------------------
       
    71 
       
    72 Minor number change means that the new version is backward compatible with the
       
    73 previous version but has significant enhancements over the previous version.
       
    74 
       
    75 Revision, micro, bugfix version component.
       
    76 ------------------------------------------
       
    77 
       
    78 Revision number is updated whenever a bugfix is applied to the build such that
       
    79 it doesn't bring a compatibility change or introduce newer features.
       
    80 
       
    81 Milestone markers.
       
    82 ------------------
       
    83 
       
    84  * a (alpha) means new development is complete and code checkins are frozen.
       
    85    Alpha builds should work well enough to be testable.
       
    86  * b (beta) means most severe bugs are fixed and end users can start trying the
       
    87    release.
       
    88  * rc (release candidate) are believed to meet all of the criteria for release
       
    89    and can be installed on test instances of production systems.
     5 
    90 
     6 Release build version data.
    91 Release build version data.
     7 ===========================
    92 ===========================
     8 
    93 
     9  * Build number.
    94  * Build number.
    13  * Overnight build (Y/N).
    98  * Overnight build (Y/N).
    14  * QA tested (Y/N).
    99  * QA tested (Y/N).
    15  * QA test results (Pass/Fail).
   100  * QA test results (Pass/Fail).
    16  * Location of full logs.
   101  * Location of full logs.
    17 
   102 
    18 Order formula.
   103 Version ordering formula.
    19 ==============
   104 =========================
       
   105 
       
   106 Strongly recommend:
       
   107 
       
   108  * Numbers are not decimal fractions. They are integers separated by delimiters.
       
   109  * Only offically released versions of the program get version numbers.
       
   110    Development snapshots don't. Nor do test releases.
       
   111  * If the last component is zero, it may be omitted. Do not distinguish version
       
   112    X.Y from version X.Y.0.
       
   113  * Avoid using anything other than numbers in version numbers.
       
   114 
       
   115 
       
   116 Debian version ordering formula.
       
   117 --------------------------------
       
   118 
       
   119 TODO
       
   120 
       
   121 Semver version ordering formula.
       
   122 --------------------------------
    20 
   123 
    21 if (A.major != B.major) return A.major > B.major;
   124 if (A.major != B.major) return A.major > B.major;
    22 if (A.minor != B.minor) return A.minor > B.minor;
   125 if (A.minor != B.minor) return A.minor > B.minor;
    23 if (A.patch != B.patch) return A.patch > B.patch;
   126 if (A.patch != B.patch) return A.patch > B.patch;
    24 if (A.special == B.special) return 0;
   127 if (A.special == B.special) return 0;
    26 if (B.special == "") return -1;
   129 if (B.special == "") return -1;
    27 return A.special > B.special;
   130 return A.special > B.special;
    28 
   131 
    29 **NOTE** Accoding to this definition 1.0.1rc1 < 1.0.1rc10 < 1.0.1rc2 which is
   132 **NOTE** Accoding to this definition 1.0.1rc1 < 1.0.1rc10 < 1.0.1rc2 which is
    30 non meaningful.
   133 non meaningful.
       
   134 
       
   135 Odd/even numbering.
       
   136 -------------------
       
   137 
       
   138 Who use:
       
   139 
       
   140   GLib GTK+ Gimp GNOME Kaffe
    31 
   141 
    32 Compatibility formula.
   142 Compatibility formula.
    33 ======================
   143 ======================
    34 
   144 
    35 Assume that app linked with new version of lib. Thus::
   145 Assume that app linked with new version of lib. Thus::