summaryrefslogtreecommitdiff
path: root/buildstream/_plugincontext.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_plugincontext.py')
-rw-r--r--buildstream/_plugincontext.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/buildstream/_plugincontext.py b/buildstream/_plugincontext.py
index 0be3de1b1..c84af4f0a 100644
--- a/buildstream/_plugincontext.py
+++ b/buildstream/_plugincontext.py
@@ -21,7 +21,7 @@
import os
import inspect
-from ._exceptions import PluginError
+from ._exceptions import AppError, PluginError
from . import utils
@@ -211,6 +211,10 @@ class PluginContext():
# Now assert BuildStream version
bst_major, bst_minor = utils.get_bst_version()
+ if (bst_major, bst_minor) == (None, None):
+ raise AppError("Your git repository has no tags - BuildStream can't"
+ " determine its version. Please run `git fetch --tags`.")
+
if bst_major < plugin_type.BST_REQUIRED_VERSION_MAJOR or \
(bst_major == plugin_type.BST_REQUIRED_VERSION_MAJOR and
bst_minor < plugin_type.BST_REQUIRED_VERSION_MINOR):