Skip to content

Commit a83e6fc

Browse files
committed
Update version tag
1 parent 25c088b commit a83e6fc

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

InteractiveHtmlBom/version.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Update this when new version is tagged.
2-
LAST_TAG = 'v2.3'
3-
42
import os
5-
plugin_path = os.path.realpath(os.path.dirname(__file__))
6-
plugin_path if not os.path.islink(plugin_path) else os.readlink(plugin_path)
3+
import subprocess
4+
5+
6+
LAST_TAG = 'v2.4'
7+
78

89
def _get_git_version():
9-
import os, subprocess
10+
plugin_path = os.path.realpath(os.path.dirname(__file__))
1011
try:
1112
git_version = subprocess.check_output(
12-
['git', 'describe', '--tags', '--abbrev=4', '--dirty=-*'],
13-
cwd=plugin_path)
14-
return git_version.decode('utf-8') if isinstance(git_version, bytes) else git_version
13+
['git', 'describe', '--tags', '--abbrev=4', '--dirty=-*'],
14+
cwd=plugin_path)
15+
if isinstance(git_version, bytes):
16+
return git_version.decode('utf-8').rstrip()
17+
else:
18+
return git_version.rstrip()
1519
except subprocess.CalledProcessError as e:
1620
print('Git version check failed: ' + str(e))
1721
except Exception as e:

0 commit comments

Comments
 (0)