summaryrefslogtreecommitdiffstats
path: root/src/defs_version.h
blob: 73162f722f2b36d8b4bb14c47a9b530af60737d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Doing this in its own file avoids needlessly rebuilding everything when just
// the version number changes
//
// Some notes on versioning:
// - For Windows, src/SConscript loads this and produces src/mixxx.rc.include
//   which is included by src/mixxx.rc when rc.exe compiles it.
//
// - Windows versions in mixxx.rc need to match major.minor.patch
//   https://msdn.microsoft.com/en-us/library/aa370859(v=vs.85).aspx
//   The SConscript reads VERSION and strips off ~ and - parts when it writes
//   mixxx.rc.include.
//
//   If you change the VERSION format we use, make sure mixxx.rc is valid!
//
// - Debian versions are compared (i.e. version A comes before version B) in a
//   very specific order. We need to be careful to prevent situations where our
//   betas or release candidates are considered "newer" than the release itself.
//   https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
//
// Here's how we should format our versions:
//
//  ===================================
//  |  MAJOR.MINOR.PATCH~(betaX|rcX)  |
//  ===================================
//
// The build server will append an Ubuntu version to this package name such as
// "-0ubuntu1~trusty1". So the final Debian package version will be something
// like:
//
// MAJOR.MINOR.PATCH~beta1-0ubuntu1~precise1
//
// You can use dpkg --compare-versions to test that this works as desired:
//
// $ dpkg --compare-versions 2.0.0~rc1-0ubuntu1 lt 2.0.0-0ubuntu1 && echo true
//
#ifndef MIXXX_VERSION
    // In that case, this value is used

    // READ ABOVE CAREFULLY BEFORE CHANGING!
    // USE 3 DIGITS VERSION ONLY !
    // CHANGE IN ACTUAL VERSION FILE
    #include "_version.h"
#endif