Skip to content

Commit ba33f2a

Browse files
committed
Read client version from VERSION file
1 parent 3bb530d commit ba33f2a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

juju/version.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# Copyright 2023 Canonical Ltd.
22
# Licensed under the Apache V2, see LICENCE file for details.
33

4+
import re
45

56
LTS_RELEASES = ["jammy", "focal", "bionic", "xenial", "trusty", "precise"]
67

78
DEFAULT_ARCHITECTURE = 'amd64'
89

10+
VERSION_FILE_PATH = '../VERSION'
11+
CLIENT_VERSION = re.search(r'\d+\.\d+\.\d+', open(VERSION_FILE_PATH).read().strip()).group()
12+
913
# Juju server version we target. Depending on this value, the Juju server
1014
# may stop the connecting considering us not compatible.
1115
TARGET_JUJU_VERSION = '3.2.0'

0 commit comments

Comments
 (0)