Changeset 1299ea5b49 in tspsg for tspsg.pro


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
  • tspsg.pro

    r7ba743d983 r1299ea5b49  
    3131QMAKE_TARGET_COPYRIGHT = Copyright © 2007-2011 Oleksii "Lёppa" Serdiuk <contacts[at]oleksii[dot]name>
    3232
    33 # Versioning
    34 BUILD_VERSION_MAJOR = 0
    35 BUILD_VERSION_MINOR = 1
    36 BUILD_RELEASE = 5
    37 
    38 # These are only defined on releases
    39 #DEFINES += TSPSG_RELEASE_BUILD
    40 #DEFINES += BUILD_STATUS_TYPE=beta
    41 #DEFINES += BUILD_STATUS_NUMBER=2
    42 
    43 #REVISION = 170
    44 isEmpty(REVISION) {
    45     REVISION = $$system(svnversion)
    46 }
    47 isEmpty(REVISION)|isEqual(REVISION,exported) {
    48     REVISION = 0
    49 } else {
    50     REVISION = $$replace(REVISION,":","")
    51     REVISION = $$replace(REVISION,"M","")
    52 }
    53 SHORT_VERSION = $$sprintf("%1.%2",$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR)
    54 win32-msvc*|wincewm* {
    55     VERSION = $$SHORT_VERSION
    56 } else {
    57     VERSION = $$sprintf("%1.%2",$$SHORT_VERSION,$$BUILD_RELEASE)
    58 }
     33# Version detection
     34include(version.pri)
    5935
    6036DEFINES += BUILD_VERSION_MAJOR=$$BUILD_VERSION_MAJOR \
    6137    BUILD_VERSION_MINOR=$$BUILD_VERSION_MINOR \
    6238    BUILD_RELEASE=$$BUILD_RELEASE \
    63     BUILD_NUMBER=$$REVISION
     39    BUILD_NUMBER=$$BUILD_NUMBER
    6440
    6541CONFIG(release, debug|release) {
Note: See TracChangeset for help on using the changeset viewer.