Index: main.cpp =================================================================== diff -u -r5687815256ae070a9a207107088e3f72dd464da0 -r9904f128a5170a62fd76839929b4560a3800c9ad --- main.cpp (.../main.cpp) (revision 5687815256ae070a9a207107088e3f72dd464da0) +++ main.cpp (.../main.cpp) (revision 9904f128a5170a62fd76839929b4560a3800c9ad) @@ -409,12 +409,25 @@ QString ver_revis = QString("%1").arg(VER_REVIS ); QString ver_branch = QString("%1").arg(VER_BRANCH ); QString ver_comp = QString("%1").arg(SW_COMPATIBILITY_REV ); + QString ver_branchx = ""; if (ver_revis.isEmpty()) { ver_revis = VER_REVIS_DEV; isOnServer = false; } + //DEBUG: On Server + // isOnServer = true; + // ver_branch = "release/p1"; + // ver_branch = "release/p1_staging"; + // ver_branch = "release/p1_develop"; + // ver_branch = "release/p1b/master"; + // ver_branch = "release/p1/staging"; + // ver_branch = "release/p1/develop"; + // ver_branch = "master"; + // ver_branch = "staging"; + // ver_branch = "develop"; + bool isRelease = ver_branch.startsWith("release/"); bool isOnMaster = ver_branch == "master"; bool isNotStory = isRelease || @@ -427,7 +440,17 @@ ver_branch = ""; // if only is built on server master branch do not show branch } if ( isRelease ) { - ver_branch = ver_branch.remove(0,QString("release/").length()).toUpper(); + ver_branch = ver_branch.remove(0,QString("release/").length()); + QStringList ver_branch_sections = ver_branch.split("/"); + if ( ver_branch_sections.count() >= 2 ) { + ver_branch = ver_branch_sections[0].toUpper(); + ver_branchx = ver_branch_sections[1]; + if ( ver_branchx == "master" ) { + ver_branchx = ""; + } else { + ver_branchx = "-" + ver_branchx; + } + } } ver_major += sepVers; ver_minor += sepVers; @@ -445,7 +468,7 @@ version += ver_micro ; version += ver_revis ; // build number version += ver_comp ; - + version += ver_branchx ; QCoreApplication::setApplicationVersion(version); }