gns3-server/gns3server/version.py
grossmj 263febecbc Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	CHANGELOG
#	appveyor.yml
#	dev-requirements.txt
#	gns3server/compute/base_node.py
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/utils/get_resource.py
#	gns3server/version.py
#	gns3server/web/route.py
#	requirements.txt
#	tests/handlers/api/compute/test_qemu.py
#	win-requirements.txt
2022-11-09 20:30:28 +08:00

37 lines
1.4 KiB
Python

#
# Copyright (C) 2015 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# __version__ is a human-readable version number.
# __version_info__ is a four-tuple for programmatic comparison. The first
# three numbers are the components of the version number. The fourth
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)
__version__ = "3.0.0.dev6"
__version_info__ = (3, 0, 0, 99)
if "dev" in __version__:
try:
import os
import subprocess
if os.path.exists(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".git")):
r = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).decode().strip("\n")
__version__ += "+" + r
except Exception as e:
print(e)