Skip to content

Commit

Permalink
Update version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
qu1ck committed Oct 21, 2021
1 parent 25c088b commit a83e6fc
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions InteractiveHtmlBom/version.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# Update this when new version is tagged.
LAST_TAG = 'v2.3'

import os
plugin_path = os.path.realpath(os.path.dirname(__file__))
plugin_path if not os.path.islink(plugin_path) else os.readlink(plugin_path)
import subprocess


LAST_TAG = 'v2.4'


def _get_git_version():
import os, subprocess
plugin_path = os.path.realpath(os.path.dirname(__file__))
try:
git_version = subprocess.check_output(
['git', 'describe', '--tags', '--abbrev=4', '--dirty=-*'],
cwd=plugin_path)
return git_version.decode('utf-8') if isinstance(git_version, bytes) else git_version
['git', 'describe', '--tags', '--abbrev=4', '--dirty=-*'],
cwd=plugin_path)
if isinstance(git_version, bytes):
return git_version.decode('utf-8').rstrip()
else:
return git_version.rstrip()
except subprocess.CalledProcessError as e:
print('Git version check failed: ' + str(e))
except Exception as e:
Expand Down

0 comments on commit a83e6fc

Please sign in to comment.