diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2018-06-08 13:46:40 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-06-11 14:16:33 -0400 |
commit | 9f77cb66cf4be2b09df48469c05735f3c5efce76 (patch) | |
tree | c6d9b01bb3d5613e4fab6cb3513f12f7593bdb2a | |
parent | ea775fa30ba0087b8d2f8cb50ad00d41aa808fe3 (diff) | |
download | buildstream-9f77cb66cf4be2b09df48469c05735f3c5efce76.tar.gz |
Handle missing tags in git repositories correctly
Fixes issue #380
-rw-r--r-- | buildstream/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/buildstream/utils.py b/buildstream/utils.py index 70759dc12..af5bac3fb 100644 --- a/buildstream/utils.py +++ b/buildstream/utils.py @@ -472,6 +472,10 @@ def get_bst_version(): from . import __version__ versions = __version__.split('.')[:2] + if versions[0] == '0+untagged': + raise UtilError("Your git repository has no tags - BuildStream can't " + "determine its version. Please run `git fetch --tags`.") + return (int(versions[0]), int(versions[1])) |