summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAustin English <austinenglish@gmail.com>2016-05-20 21:16:19 -0500
committerAustin English <austinenglish@gmail.com>2016-05-24 21:09:56 -0500
commitf9ad6d8ccd713056d01138de3a67f673144d7e7d (patch)
tree1ef9dfca00c54d5161068976c725b2310401acdf
parent215b1536aedd9949fc7cd71cf766bc3708c7f194 (diff)
Rakefile: check that vagrant >= 1.8
Signed-off-by: Austin English <austinenglish@gmail.com>
-rw-r--r--Rakefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 1f013df..e304ff3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -22,6 +22,13 @@ require 'open3'
require 'rbconfig'
require 'uri'
+# Check Vagrant version, make sure it is at least 1.8:
+# FIXME: is there a vagrant builtin for this?
+vagrant_version, stderr = Open3.capture2('vagrant --version | cut -d " " -f2 | tr -d "\n" ')
+if Gem::Version.new(vagrant_version) < Gem::Version.new('1.8')
+ raise("vagrant version #{vagrant_version} is too old, at least 1.8 is required.")
+end
+
require_relative 'vagrant/lib/tails_build_settings'
# Path to the directory which holds our Vagrantfile