summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2018-08-31 22:11:49 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-08-31 22:11:49 +0000
commit8d9d4c8477732c5cc559eb10ddacef4598f93591 (patch)
tree4d53108cc9aeac49526068ba9de0149ac80fabb4
parent43e51a04515686a15c410d1a16dd5ff06fd1afd4 (diff)
downloadvyos-cloud-init-8d9d4c8477732c5cc559eb10ddacef4598f93591.tar.gz
vyos-cloud-init-8d9d4c8477732c5cc559eb10ddacef4598f93591.zip
read-version: enhance error message
The error message when read-vesion is not very useful and does not help the end-user know how to overcome the issue. This adds a short message explaining that the user does not have the latest upstream tags and how to get those tags.
-rwxr-xr-xtools/read-version6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/read-version b/tools/read-version
index 3ea9e66e..e69c2ce0 100755
--- a/tools/read-version
+++ b/tools/read-version
@@ -76,6 +76,12 @@ if is_gitdir(_tdir) and which("git"):
if not version.startswith(src_version):
sys.stderr.write("git describe version (%s) differs from "
"cloudinit.version (%s)\n" % (version, src_version))
+ sys.stderr.write(
+ "Please get the latest upstream tags.\n"
+ "As an example, this can be done with the following:\n"
+ "$ git remote add upstream https://git.launchpad.net/cloud-init\n"
+ "$ git fetch upstream --tags\n"
+ )
sys.exit(1)
version_long = tiny_p(cmd + ["--long"]).strip()