Make version numbers of snapshots more meaningful.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
@VERSION_STRING@
|
||||
+27
-2
@@ -17,6 +17,26 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/"
|
||||
set (WEBSITE "glabels.org")
|
||||
set (BUG_WEBSITE "https://github.com/jimevins/glabels-qt/issues")
|
||||
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
RESULT_VARIABLE BRANCH_VALID
|
||||
OUTPUT_VARIABLE BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if (NOT ${BRANCH_VALID} STREQUAL "0")
|
||||
set (BRANCH "Unkonwn")
|
||||
endif ()
|
||||
|
||||
execute_process(
|
||||
COMMAND git rev-list --count ${BRANCH}
|
||||
RESULT_VARIABLE COMMIT_COUNT_VALID
|
||||
OUTPUT_VARIABLE COMMIT_COUNT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if (NOT ${COMMIT_COUNT_VALID} STREQUAL "0")
|
||||
set (COMMIT_COUNT "?")
|
||||
endif ()
|
||||
|
||||
execute_process(
|
||||
COMMAND git log -1 --format=%h
|
||||
RESULT_VARIABLE COMMIT_HASH_VALID
|
||||
@@ -38,11 +58,16 @@ if (NOT ${COMMIT_DATE_VALID} STREQUAL "0")
|
||||
endif ()
|
||||
|
||||
# Uncomment for snapshots, comment for releases
|
||||
set(VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}-snapshot (${COMMIT_HASH} ${COMMIT_DATE})")
|
||||
set(VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}-${BRANCH}${COMMIT_COUNT}")
|
||||
|
||||
# Uncomment for releases, comment for snapshots
|
||||
#set(VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||
|
||||
set(LONG_VERSION_STRING "${VERSION_STRING} (${COMMIT_HASH} ${COMMIT_DATE})")
|
||||
|
||||
# Auto-generate version file
|
||||
configure_file (.version.in VERSION @ONLY)
|
||||
|
||||
|
||||
#=======================================
|
||||
# Packaging Information
|
||||
@@ -147,7 +172,7 @@ add_subdirectory (data)
|
||||
#=======================================
|
||||
message (STATUS "")
|
||||
message (STATUS "Project name ............ " ${CMAKE_PROJECT_NAME})
|
||||
message (STATUS "Project version ......... " ${VERSION_STRING})
|
||||
message (STATUS "Project version ......... " ${LONG_VERSION_STRING})
|
||||
message (STATUS "Installation prefix ..... " ${CMAKE_INSTALL_PREFIX})
|
||||
message (STATUS "Source code location .... " ${glabels_SOURCE_DIR})
|
||||
message (STATUS "CMake version ........... " ${CMAKE_VERSION})
|
||||
|
||||
@@ -60,7 +60,7 @@ int main( int argc, char **argv )
|
||||
QCoreApplication::setOrganizationName( "glabels.org" );
|
||||
QCoreApplication::setOrganizationDomain( "glabels.org" );
|
||||
QCoreApplication::setApplicationName( "glabels-batch-qt" );
|
||||
QCoreApplication::setApplicationVersion( glabels::model::Version::STRING );
|
||||
QCoreApplication::setApplicationVersion( glabels::model::Version::LONG_STRING );
|
||||
|
||||
//
|
||||
// Setup translators
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace glabels
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
QString version = tr("Version") + " " + model::Version::STRING;
|
||||
QString version = tr("Version") + " " + model::Version::LONG_STRING;
|
||||
|
||||
QString description = tr("A program to create labels and business cards.");
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ int main( int argc, char **argv )
|
||||
QCoreApplication::setOrganizationName( "glabels.org" );
|
||||
QCoreApplication::setOrganizationDomain( "glabels.org" );
|
||||
QCoreApplication::setApplicationName( "glabels-qt" );
|
||||
QCoreApplication::setApplicationVersion( glabels::model::Version::STRING );
|
||||
QCoreApplication::setApplicationVersion( glabels::model::Version::LONG_STRING );
|
||||
|
||||
//
|
||||
// Setup translators
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace glabels
|
||||
const int MICRO = @glabels-qt_VERSION_PATCH@;
|
||||
|
||||
const QString STRING = "@VERSION_STRING@";
|
||||
const QString LONG_STRING = "@LONG_VERSION_STRING@";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "GLABELS-BATCH-QT" "1" "Apr 29, 2019" "" "gLabels"
|
||||
.TH "GLABELS-BATCH-QT" "1" "May 05, 2019" "" "gLabels"
|
||||
.SH NAME
|
||||
glabels-batch-qt \- batch creation of labels and business cards
|
||||
.
|
||||
@@ -110,7 +110,7 @@ Directory for manually created product templates.
|
||||
.UNINDENT
|
||||
.SH BUGS
|
||||
.sp
|
||||
Bugs and featue requests can be reported via the gLabels issue tracking system at GitHub (<\fI\%https://github.com/jimevins/glabels\-qt/issues\fP>). You will need a GitHub account to submit new issues or to comment on existing issues.
|
||||
Bugs and feature requests can be reported via the gLabels issue tracking system at GitHub (<\fI\%https://github.com/jimevins/glabels\-qt/issues\fP>). You will need a GitHub account to submit new issues or to comment on existing issues.
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fBglabels\-qt(1)\fP
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "GLABELS-QT" "1" "Apr 29, 2019" "" "gLabels"
|
||||
.TH "GLABELS-QT" "1" "May 05, 2019" "" "gLabels"
|
||||
.SH NAME
|
||||
glabels-qt \- create labels and business cards
|
||||
.
|
||||
@@ -69,7 +69,7 @@ Directory for manually created product templates.
|
||||
.UNINDENT
|
||||
.SH BUGS
|
||||
.sp
|
||||
Bugs and featue requests can be reported via the gLabels issue tracking system at GitHub (<\fI\%https://github.com/jimevins/glabels\-qt/issues\fP>). You will need a GitHub account to submit new issues or to comment on existing issues.
|
||||
Bugs and feature requests can be reported via the gLabels issue tracking system at GitHub (<\fI\%https://github.com/jimevins/glabels\-qt/issues\fP>). You will need a GitHub account to submit new issues or to comment on existing issues.
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fBglabels\-batch\-qt(1)\fP
|
||||
|
||||
Reference in New Issue
Block a user