Changeset 1299ea5b49 in tspsg for src/version.h


Ignore:
Timestamp:
Jul 10, 2012, 5:34:54 PM (12 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
b26801b000
Parents:
7ba743d983
Message:

Updated version info to be set based on git tags.

'git describe' is now used for version definition. Major, minor and
release are taken from the latest git tag. Build is defined as number of
commits since the latest tag. If we're out of source, then .tag file
should contain output of 'git describe --abbrev=40' command.

Also, moved version related code from tspsg.pro to version.pri.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/version.h

    r7ba743d983 r1299ea5b49  
    4949/*!
    5050 * \def BUILD_STATUS
    51  * \brief TSPSG build status
     51 * \brief TSPSG build status (e.g., alpha1, beta3)
    5252 */
    5353#ifdef DEBUG
    54 #   ifndef BUILD_STATUS_TYPE
    55 #       define BUILD_STATUS (debug build BUILD_NUMBER)
     54#   ifndef BUILD_STATUS
     55#       define BUILD_STATUS_STR (debug build)
    5656#   else
    57 #       define BUILD_STATUS (debug BUILD_STATUS_TYPE BUILD_STATUS_NUMBER)
     57#       define BUILD_STATUS_STR (debug BUILD_STATUS)
    5858#   endif
    5959#else
    6060#   if !defined(TSPSG_RELEASE_BUILD)
    61 #       define BUILD_STATUS (nightly build)
    62 #   elif !defined(BUILD_STATUS_TYPE)
    63 #       define BUILD_STATUS (build BUILD_NUMBER)
     61#       define BUILD_STATUS_STR (nightly build)
     62#   elif !defined(BUILD_STATUS)
     63#       define BUILD_STATUS_STR (build BUILD_NUMBER)
    6464#   else
    65 #       define BUILD_STATUS (BUILD_STATUS_TYPE BUILD_STATUS_NUMBER)
     65#       define BUILD_STATUS_STR (BUILD_STATUS)
    6666#   endif // TSPSG_RELEASE_BUILD
    6767#endif // DEBUG
     
    7373
    7474//! Full version of TSPSG in the form: \c major.minor.release.build \c status.
    75 #define BUILD_VERSION QUOTE(BUILD_VERSION_MAJOR.BUILD_VERSION_MINOR.BUILD_RELEASE BUILD_STATUS)
     75#define BUILD_VERSION QUOTE(BUILD_VERSION_MAJOR.BUILD_VERSION_MINOR.BUILD_RELEASE BUILD_STATUS_STR)
     76
     77/*!
     78 * \def REVISION_STR
     79 * \brief Git revision from which build was made
     80 */
     81#ifdef REVISION
     82#   define REVISION_STR QUOTE(REVISION)
     83#else
     84#   define REVISION_STR "$Format:%H$"
     85#endif
    7686
    7787#endif // VERSION_H
Note: See TracChangeset for help on using the changeset viewer.