Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
57b381cf
Commit
57b381cf
authored
Jul 09, 2016
by
Daniel Agar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update version from git
parent
09493831
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
QGCCommon.pri
QGCCommon.pri
+18
-7
QGCApplication.cc
src/QGCApplication.cc
+1
-7
No files found.
QGCCommon.pri
View file @
57b381cf
...
...
@@ -100,27 +100,38 @@ MobileBuild {
exists ($$PWD/.git) {
GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
GIT_HASH = $$system(git rev-parse HEAD)
GIT_BRANCH = $$system(git --git-dir $$PWD/.git --work-tree $$PWD rev-parse --abbrev-ref HEAD)
GIT_HASH = $$system(git --git-dir $$PWD/.git --work-tree $$PWD rev-parse --short HEAD)
GIT_TIME = $$system(git --git-dir $$PWD/.git --work-tree $$PWD show --oneline --format=\"%ci\" -s HEAD)
# determine if we're on a tag matching vX.Y.Z (stable release)
GIT_TAG = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --exact-match --tags HEAD)
contains(GIT_TAG, v[0-9].[0-9].[0-9]) {
# release version "vX.Y.Z"
GIT_VERSION = $${GIT_DESCRIBE}
} else {
# development version "Development branch:sha date"
GIT_VERSION = "Development $${GIT_BRANCH}:$${GIT_HASH} $${GIT_TIME}"
}
VERSION = $$replace(GIT_DESCRIBE, "v", "")
VERSION = $$replace(VERSION, "-", ".")
VERSION = $$section(VERSION, ".", 0, 3)
MacBuild {
MAC_VERSION = $$section(VERSION, ".", 0, 2)
MAC_BUILD = $$section(VERSION, ".", 3, 3)
message(QGroundControl version $${MAC_VERSION} build $${MAC_BUILD} describe $${GIT_
DESCRIBE} hash $${GIT_HASH
})
message(QGroundControl version $${MAC_VERSION} build $${MAC_BUILD} describe $${GIT_
VERSION
})
} else {
message(QGroundControl version $${VERSION} describe $${GIT_
DESCRIBE} hash $${GIT_HASH
})
message(QGroundControl version $${VERSION} describe $${GIT_
VERSION
})
}
} else {
GIT_DESCRIBE = None
GIT_HASH = None
GIT_VERSION = None
VERSION = 0.0.0 # Marker to indicate out-of-tree build
MAC_VERSION = 0.0.0
MAC_BUILD = 0
}
DEFINES += GIT_TAG=\"\\\"$$GIT_DESCRIBE\\\"\"
DEFINES += GIT_HASH=\"\\\"$$GIT_HASH\\\"\"
DEFINES += GIT_VERSION=\"\\\"$$GIT_VERSION\\\"\"
DEFINES += EIGEN_MPL2_ONLY
# Installer configuration
...
...
src/QGCApplication.cc
View file @
57b381cf
...
...
@@ -274,13 +274,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
setOrganizationName
(
QGC_ORG_NAME
);
setOrganizationDomain
(
QGC_ORG_DOMAIN
);
QString
versionString
(
GIT_TAG
);
// stable versions are on tags (v1.2.3)
// development versions are full git describe versions (v1.2.3-18-g879e8b3)
if
(
versionString
.
length
()
>
8
)
{
versionString
.
append
(
" (Development)"
);
}
this
->
setApplicationVersion
(
versionString
);
this
->
setApplicationVersion
(
QString
(
GIT_VERSION
));
// Set settings format
QSettings
::
setDefaultFormat
(
QSettings
::
IniFormat
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment