Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qgroundcontrol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hironori Komaba
qgroundcontrol
Commits
cf9588a1
Commit
cf9588a1
authored
3 years ago
by
Don Gagne
Committed by
Don Gagne
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix version parsing
parent
d308978a
No related branches found
Branches containing commit
Tags
v4.2.0
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
QGCCommon.pri
+20
-26
20 additions, 26 deletions
QGCCommon.pri
src/QGCApplication.cc
+1
-1
1 addition, 1 deletion
src/QGCApplication.cc
with
21 additions
and
27 deletions
QGCCommon.pri
+
20
−
26
View file @
cf9588a1
...
...
@@ -156,8 +156,11 @@ StableBuild {
DEFINES += DAILY_BUILD
}
# set the QGC version from git
# Set the QGC version from git
APP_VERSION_STR = vUnknown
VERSION = 0.0.0 # Marker to indicate out-of-tree build
MAC_VERSION = 0.0.0
MAC_BUILD = 0
exists ($$PWD/.git) {
GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
GIT_BRANCH = $$system(git --git-dir $$PWD/.git --work-tree $$PWD rev-parse --abbrev-ref HEAD)
...
...
@@ -166,35 +169,27 @@ exists ($$PWD/.git) {
message(GIT_DESCRIBE $${GIT_DESCRIBE})
# Pull the version info from the last annotated version tag
# Stable builds will be in the format v#.#.#
# Daily builds on master will be in format d#.#.#
contains(GIT_DESCRIBE, ^[vd][0-9]+.[0-9]+.[0-9]+.*) {
message( release version "vX.Y.Z")
GIT_VERSION = $${GIT_DESCRIBE}
VERSION = $$replace(GIT_DESCRIBE, "v", "")
VERSION = $$replace(GIT_DESCRIBE, "d", "")
VERSION = $$replace(VERSION, "-", ".")
VERSION = $$section(VERSION, ".", 0, 3)
} else {
message(development version "Development branch:sha date")
GIT_VERSION = "Development $${GIT_BRANCH}:$${GIT_HASH} $${GIT_TIME}"
VERSION = 0.0.0
# Pull the version info from the last annotated version tag. Format: v#.#.#
contains(GIT_DESCRIBE, ^v[0-9]+.[0-9]+.[0-9]+.*) {
APP_VERSION_STR = $${GIT_DESCRIBE}
VERSION = $$replace(GIT_DESCRIBE, "v", "")
VERSION = $$replace(VERSION, "-", ".")
VERSION = $$section(VERSION, ".", 0, 3)
}
DailyBuild {
APP_VERSION_STR = "Daily $${GIT_BRANCH}:$${GIT_HASH} $${GIT_TIME}"
}
message(QGroundControl APP_VERSION_STR VERSION $${APP_VERSION_STR} $${VERSION})
MacBuild {
MAC_VERSION = $$section(VERSION, ".", 0, 2)
MAC_BUILD = $$section(VERSION, ".", 3, 3)
message(QGroundControl version $${MAC_VERSION} build $${MAC_BUILD} describe $${GIT_VERSION})
} else {
message(QGroundControl $${GIT_VERSION})
message(QGroundControl MAC_VERSION MAC_BUILD $${MAC_VERSION} $${MAC_BUILD})
}
} else {
GIT_VERSION = None
VERSION = 0.0.0 # Marker to indicate out-of-tree build
MAC_VERSION = 0.0.0
MAC_BUILD = 0
}
DEFINES += APP_VERSION_STR=\"\\\"$$APP_VERSION_STR\\\"\"
AndroidBuild {
message(VERSION $${VERSION})
...
...
@@ -248,10 +243,9 @@ AndroidBuild {
message(Android version info: $${ANDROID_VERSION_CODE} bitness:$${ANDROID_VERSION_BITNESS} major:$${MAJOR_VERSION} minor:$${MINOR_VERSION} patch:$${PATCH_VERSION} dev:$${DEV_VERSION})
ANDROID_VERSION_NAME =
GIT
_VERSION
ANDROID_VERSION_NAME =
APP
_VERSION
_STR
}
DEFINES += GIT_VERSION=\"\\\"$$GIT_VERSION\\\"\"
DEFINES += EIGEN_MPL2_ONLY
# Installer configuration
...
...
This diff is collapsed.
Click to expand it.
src/QGCApplication.cc
+
1
−
1
View file @
cf9588a1
...
...
@@ -273,7 +273,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
setOrganizationName
(
QGC_ORG_NAME
);
setOrganizationDomain
(
QGC_ORG_DOMAIN
);
this
->
setApplicationVersion
(
QString
(
GIT
_VERSION
));
this
->
setApplicationVersion
(
QString
(
APP
_VERSION
_STR
));
// Set settings format
QSettings
::
setDefaultFormat
(
QSettings
::
IniFormat
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment