forked from juju/python-libjuju
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the version info into the source code instead of static VERSION
file This fixes juju#1025 by removing the dependency to the external static VERSION file from within the project, allowing it to work in environments where pylibjuju is installed as a dependency library. Note that this changes the release process. In particular where we need to manually change the version information is moved into version.py (the release process document will be updated) This also removes the VERSION file.
- Loading branch information
Showing
5 changed files
with
6 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
# Copyright 2023 Canonical Ltd. | ||
# Licensed under the Apache V2, see LICENCE file for details. | ||
|
||
import pathlib | ||
import re | ||
|
||
LTS_RELEASES = ["jammy", "focal", "bionic", "xenial", "trusty", "precise"] | ||
|
||
DEFAULT_ARCHITECTURE = 'amd64' | ||
|
||
# CLIENT_VERSION (that's read from the VERSION file) is the highest Juju server | ||
# version that this client supports. | ||
# Note that this is a ceiling. CLIENT_VERSION <= juju-controller-version works. | ||
# For CLIENT_VERSION < juju-controller-version (strictly smaller), we emit a warning | ||
# to update the client to the latest. | ||
# However, for any CLIENT_VERSION > juju-controller-version, a "client incompatible | ||
# with server" will be returned by the juju controller. | ||
VERSION_FILE_PATH = pathlib.Path(__file__).parent.parent / 'VERSION' | ||
CLIENT_VERSION = re.search(r'\d+\.\d+\.\d+', open(VERSION_FILE_PATH).read().strip()).group() | ||
CLIENT_VERSION = "3.3.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters