From 88c41dfbdb500e2bdf476ebbad2c82c1bf3ee2e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Bl=C3=A4ttermann?= Date: Fri, 5 Apr 2019 12:47:33 +0200 Subject: [PATCH 1/8] Add BUGS sections to man pages --- user-docs/man/glabels-batch-qt.rst | 12 ++++++++++++ user-docs/man/glabels-qt.rst | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/user-docs/man/glabels-batch-qt.rst b/user-docs/man/glabels-batch-qt.rst index 0ad6fdd..b343535 100644 --- a/user-docs/man/glabels-batch-qt.rst +++ b/user-docs/man/glabels-batch-qt.rst @@ -79,6 +79,18 @@ FILES Directory for manually created product templates. +BUGS +---- + +To report a bug or make a suggestion regarding this application or this manual +page, you can use the issues section at Github: + + + +It is needed to register/sign in before. In case of you use another locale than +**en** on your system, it would be very helpful for developers if you set the +locale back to American English with the command ``export LC_ALL=C`` before +launching `glabels-qt`. SEE ALSO -------- diff --git a/user-docs/man/glabels-qt.rst b/user-docs/man/glabels-qt.rst index 1c2b152..8edc980 100644 --- a/user-docs/man/glabels-qt.rst +++ b/user-docs/man/glabels-qt.rst @@ -43,6 +43,18 @@ FILES Directory for manually created product templates. +BUGS +---- + +To report a bug or make a suggestion regarding this application or this manual +page, you can use the issues section at Github: + + + +It is needed to register/sign in before. In case of you use another locale than +**en** on your system, it would be very helpful for developers if you set the +locale back to American English with the command ``export LC_ALL=C`` before +launching `glabels-qt`. SEE ALSO -------- From 10518306b85a0f32da65a747d39696901c1696c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Bl=C3=A4ttermann?= Date: Fri, 5 Apr 2019 15:36:11 +0200 Subject: [PATCH 2/8] Add a more informative short summary for man pages --- user-docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user-docs/conf.py b/user-docs/conf.py index 9535f1f..8b957c5 100644 --- a/user-docs/conf.py +++ b/user-docs/conf.py @@ -149,8 +149,8 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('man/glabels-qt', 'glabels-qt', 'gLabels Documentation', [author], 1), - ('man/glabels-batch-qt', 'glabels-batch-qt', 'gLabels Documentation', [author], 1) + ('man/glabels-qt', 'glabels-qt', 'create labels and business cards', [author], 1), + ('man/glabels-batch-qt', 'glabels-batch-qt', 'batch creation of labels and business cards', [author], 1) ] From 775a6a7822cf7cbbcb1ac69ea0fad97eed164595 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sat, 4 May 2019 14:42:05 -0400 Subject: [PATCH 3/8] Cleaned up english. --- user-docs/_build/man/glabels-batch-qt.1 | 7 +++++-- user-docs/_build/man/glabels-qt.1 | 7 +++++-- user-docs/man/glabels-batch-qt.rst | 10 +--------- user-docs/man/glabels-qt.rst | 9 +-------- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/user-docs/_build/man/glabels-batch-qt.1 b/user-docs/_build/man/glabels-batch-qt.1 index 6fa48b5..069178f 100644 --- a/user-docs/_build/man/glabels-batch-qt.1 +++ b/user-docs/_build/man/glabels-batch-qt.1 @@ -1,8 +1,8 @@ .\" Man page generated from reStructuredText. . -.TH "GLABELS-BATCH-QT" "1" "Dec 29, 2018" "" "gLabels" +.TH "GLABELS-BATCH-QT" "1" "Apr 29, 2019" "" "gLabels" .SH NAME -glabels-batch-qt \- gLabels Documentation +glabels-batch-qt \- batch creation of labels and business cards . .nr rst2man-indent-level 0 . @@ -108,6 +108,9 @@ templates here!\fP .B ${HOME}/.glabels/ 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. .SH SEE ALSO .sp \fBglabels\-qt(1)\fP diff --git a/user-docs/_build/man/glabels-qt.1 b/user-docs/_build/man/glabels-qt.1 index 66bd854..d90c351 100644 --- a/user-docs/_build/man/glabels-qt.1 +++ b/user-docs/_build/man/glabels-qt.1 @@ -1,8 +1,8 @@ .\" Man page generated from reStructuredText. . -.TH "GLABELS-QT" "1" "Dec 29, 2018" "" "gLabels" +.TH "GLABELS-QT" "1" "Apr 29, 2019" "" "gLabels" .SH NAME -glabels-qt \- gLabels Documentation +glabels-qt \- create labels and business cards . .nr rst2man-indent-level 0 . @@ -67,6 +67,9 @@ templates here!\fP .B ${HOME}/.glabels/ 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. .SH SEE ALSO .sp \fBglabels\-batch\-qt(1)\fP diff --git a/user-docs/man/glabels-batch-qt.rst b/user-docs/man/glabels-batch-qt.rst index b343535..35dcbce 100644 --- a/user-docs/man/glabels-batch-qt.rst +++ b/user-docs/man/glabels-batch-qt.rst @@ -82,15 +82,7 @@ FILES BUGS ---- -To report a bug or make a suggestion regarding this application or this manual -page, you can use the issues section at Github: - - - -It is needed to register/sign in before. In case of you use another locale than -**en** on your system, it would be very helpful for developers if you set the -locale back to American English with the command ``export LC_ALL=C`` before -launching `glabels-qt`. +Bugs and featue requests can be reported via the gLabels issue tracking system at GitHub (). You will need a GitHub account to submit new issues or to comment on existing issues. SEE ALSO -------- diff --git a/user-docs/man/glabels-qt.rst b/user-docs/man/glabels-qt.rst index 8edc980..33e18d4 100644 --- a/user-docs/man/glabels-qt.rst +++ b/user-docs/man/glabels-qt.rst @@ -46,15 +46,8 @@ FILES BUGS ---- -To report a bug or make a suggestion regarding this application or this manual -page, you can use the issues section at Github: +Bugs and featue requests can be reported via the gLabels issue tracking system at GitHub (). You will need a GitHub account to submit new issues or to comment on existing issues. - - -It is needed to register/sign in before. In case of you use another locale than -**en** on your system, it would be very helpful for developers if you set the -locale back to American English with the command ``export LC_ALL=C`` before -launching `glabels-qt`. SEE ALSO -------- From 1313c2fc197d393527ead74fec9b79bca99a8dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Bl=C3=A4ttermann?= Date: Sun, 5 May 2019 19:38:54 +0200 Subject: [PATCH 4/8] Fix typo (#52) --- user-docs/man/glabels-batch-qt.rst | 2 +- user-docs/man/glabels-qt.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/user-docs/man/glabels-batch-qt.rst b/user-docs/man/glabels-batch-qt.rst index 35dcbce..5d1baaf 100644 --- a/user-docs/man/glabels-batch-qt.rst +++ b/user-docs/man/glabels-batch-qt.rst @@ -82,7 +82,7 @@ FILES BUGS ---- -Bugs and featue requests can be reported via the gLabels issue tracking system at GitHub (). 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 (). You will need a GitHub account to submit new issues or to comment on existing issues. SEE ALSO -------- diff --git a/user-docs/man/glabels-qt.rst b/user-docs/man/glabels-qt.rst index 33e18d4..709d807 100644 --- a/user-docs/man/glabels-qt.rst +++ b/user-docs/man/glabels-qt.rst @@ -46,7 +46,7 @@ FILES BUGS ---- -Bugs and featue requests can be reported via the gLabels issue tracking system at GitHub (). 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 (). You will need a GitHub account to submit new issues or to comment on existing issues. SEE ALSO From 3256c407fb608aabe1bb9c30b36fa2d33a4aa279 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 5 May 2019 14:45:44 -0400 Subject: [PATCH 5/8] Make version numbers of snapshots more meaningful. --- .version.in | 1 + CMakeLists.txt | 29 +++++++++++++++++++++++-- glabels-batch/main.cpp | 2 +- glabels/AboutDialog.cpp | 2 +- glabels/main.cpp | 2 +- model/Version.h.in | 1 + user-docs/_build/man/glabels-batch-qt.1 | 4 ++-- user-docs/_build/man/glabels-qt.1 | 4 ++-- 8 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 .version.in diff --git a/.version.in b/.version.in new file mode 100644 index 0000000..f3e763d --- /dev/null +++ b/.version.in @@ -0,0 +1 @@ +@VERSION_STRING@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 885788f..f58d062 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/glabels-batch/main.cpp b/glabels-batch/main.cpp index e857f44..a89d045 100644 --- a/glabels-batch/main.cpp +++ b/glabels-batch/main.cpp @@ -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 diff --git a/glabels/AboutDialog.cpp b/glabels/AboutDialog.cpp index ef9ff99..acfb423 100644 --- a/glabels/AboutDialog.cpp +++ b/glabels/AboutDialog.cpp @@ -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."); diff --git a/glabels/main.cpp b/glabels/main.cpp index 1acdf1c..67b9c7c 100644 --- a/glabels/main.cpp +++ b/glabels/main.cpp @@ -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 diff --git a/model/Version.h.in b/model/Version.h.in index b9cf033..0444361 100644 --- a/model/Version.h.in +++ b/model/Version.h.in @@ -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@"; } } diff --git a/user-docs/_build/man/glabels-batch-qt.1 b/user-docs/_build/man/glabels-batch-qt.1 index 069178f..ce4b77f 100644 --- a/user-docs/_build/man/glabels-batch-qt.1 +++ b/user-docs/_build/man/glabels-batch-qt.1 @@ -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 diff --git a/user-docs/_build/man/glabels-qt.1 b/user-docs/_build/man/glabels-qt.1 index d90c351..f68653b 100644 --- a/user-docs/_build/man/glabels-qt.1 +++ b/user-docs/_build/man/glabels-qt.1 @@ -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 From b77d57ad08a66636a9fdf23d18576327ebd18724 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 5 May 2019 16:04:40 -0400 Subject: [PATCH 6/8] Another method of determining branch. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f58d062..e03fcb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ set (WEBSITE "glabels.org") set (BUG_WEBSITE "https://github.com/jimevins/glabels-qt/issues") execute_process( - COMMAND git rev-parse --abbrev-ref HEAD + COMMAND git symbolic-ref --short HEAD RESULT_VARIABLE BRANCH_VALID OUTPUT_VARIABLE BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE From 5108650ee27bb17127b84300ff35a13a713b34bc Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 5 May 2019 21:36:16 -0400 Subject: [PATCH 7/8] Re-attach to master in CI scripts to satisfy auto version tooling. --- .appveyor.yml | 1 + .travis.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 66a4c85..40d0245 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -27,6 +27,7 @@ install: - set PATH=%PATH%;%QTDIR%/bin build_script: + - git checkout master # re-attach to master to satisfy auto version tooling - mkdir build - cd build - cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=%QTDIR% .. diff --git a/.travis.yml b/.travis.yml index 45fec74..2f012d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ install: - source /opt/qt5*/bin/qt5*-env.sh script: + - git checkout master # re-attach to master to satisfy auto version tooling - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=/usr From 5109da9c6a229f172f5f52830fd146c94fc71303 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 5 May 2019 22:23:05 -0400 Subject: [PATCH 8/8] Restore repository depth in Travis CI script to properly count commits in auto versioning. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2f012d7..e97f3a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,8 @@ install: - source /opt/qt5*/bin/qt5*-env.sh script: - - git checkout master # re-attach to master to satisfy auto version tooling + - git fetch --unshallow # restore repository depth to properly count commits in auto versioning + - git checkout master # re-attach to master to satisfy auto versioning - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=/usr