Skip to content

Commit 63e20a6

Browse files
author
Gerardo E. Cruz-Ortiz
committed
Resolve nasa#112, Add version file and report development build status
Create version file Import version variables into GroundSystem.py and print in main function Add cmake temporary files to gitignore Fix gitignore problem with CmdUtil directory
1 parent 6fb6e96 commit 63e20a6

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
*.pyc
22
cmdUtil
3+
!/Subsystems/cmdUtil
4+
CMakeFiles
5+
CMakeCache.txt
36
.DS_Store

GroundSystem.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
from RoutingService import RoutingService
3232
from Ui_MainWindow import Ui_MainWindow
3333

34+
from _version import __version__ as _version
35+
from _version import _version_string
36+
37+
__version__ = _version
38+
39+
3440
ROOTDIR = Path(sys.argv[0]).resolve().parent
3541

3642

@@ -167,7 +173,10 @@ def initRoutingService(self):
167173
# Main
168174
#
169175
if __name__ == "__main__":
170-
176+
177+
# Report Version Number upon startup
178+
print(_version_string)
179+
171180
# Init app
172181
app = QApplication(sys.argv)
173182

_version.py

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# GSC-18128-1, "Core Flight Executive Version 6.7"
3+
#
4+
# Copyright (c) 2006-2019 United States Government as represented by
5+
# the Administrator of the National Aeronautics and Space Administration.
6+
# All Rights Reserved.
7+
#
8+
# Licensed under the Apache License, Version 2.0 (the "License");
9+
# you may not use this file except in compliance with the License.
10+
# You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
#
20+
#
21+
22+
# Development Build Macro Definitions
23+
_cFS_GrndSys_build_number = 73
24+
_cFS_GrndSys_build_baseline = "v2.1.0"
25+
26+
# Version Number Definitions
27+
# ONLY APPLY for OFFICIAL release builds
28+
_cFS_GrndSys_MAJOR = 2
29+
_cFS_GrndSys_MINOR = 1
30+
_cFS_GrndSys_REVISION = 0
31+
_cFS_GrndSys_MISSIONREV = 0
32+
33+
# Development Build format for __version__
34+
# Baseline git tag + Number of commits since baseline
35+
__version__ = "+dev".join((_cFS_GrndSys_build_baseline,str(_cFS_GrndSys_build_number)))
36+
37+
# Development Build format for __version_string__
38+
_version_string = " cFS-GroundSystem Development Build\n " + __version__ + " (Codename: Bootes)"
39+
40+
# Use the following templates for Official Releases ONLY
41+
42+
# Official Release format for __version__
43+
# __version__ = ".".join(map(str,(_cFS_GrndSys_MAJOR, _cFS_GrndSys_MINOR, _cFS_GrndSys_REVISION, _cFS_GrndSys_MISSIONREV)))
44+
45+
# Official Release format for _version_string
46+
# _version_string = " cFS-GroundSystem v" + __version__
47+
48+
# END TEMPLATES
49+

0 commit comments

Comments
 (0)