terraspace 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/terraspace/cli/check_setup.rb +12 -5
- data/lib/terraspace/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bd8fdab16c165766aaf3ab1d6cb3fdf2011d8ed02ac7bf713bc7dd51de862ea
|
4
|
+
data.tar.gz: b6364f9921e3330096b6a3276d6e35cf5ad26a27d70f911afac3dc33e2c4287e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2066770e8e6d31dc93986d3684f065f1b9f087e1b266cd01b999ad9f4d878bd497fce0efe656586d7b3fafa94ce859d7c8c4112be034d63a30393e46c0307d9c
|
7
|
+
data.tar.gz: b65e842ae15a0a08f6fa64c440155ac9961f8ed52a6f1ecb4d020806943b2860cb7c7073cd344a2e33ebe5984f2c05abdea2f75e2cb2da4f9323d799920f6ee8
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.2.4]
|
7
|
+
- fix version check for some versions of terraform
|
8
|
+
|
6
9
|
## [0.2.3]
|
7
10
|
* #37 config.clean_cache option
|
8
11
|
|
@@ -23,15 +23,21 @@ class Terraspace::CLI
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def check_required_version!
|
26
|
-
puts "Terraspace requires Terraform v#{REQUIRED_TERRAFORM_VERSION}.x"
|
26
|
+
puts "Terraspace requires Terraform v#{REQUIRED_TERRAFORM_VERSION}.x and above"
|
27
27
|
if ok?
|
28
28
|
puts "You're all set!"
|
29
29
|
else
|
30
|
-
puts "The installed version of terraform may not work with terraspace.
|
31
|
-
|
30
|
+
puts "The installed version of terraform may not work with terraspace."
|
31
|
+
puts "Recommend using at least terraform v#{REQUIRED_TERRAFORM_VERSION}.x"
|
32
|
+
puts "If you would like to bypass this check. Use TS_VERSION_CHECK=0" unless check_command?
|
33
|
+
exit 1 unless ENV['TS_VERSION_CHECK'] == '0'
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
37
|
+
def check_command?
|
38
|
+
ARGV[0] == "check_setup"
|
39
|
+
end
|
40
|
+
|
35
41
|
def ok?
|
36
42
|
version = terraform_version_message.sub(/.*v/,'') # => 0.12.24
|
37
43
|
major, minor, _ = version.split('.')
|
@@ -47,7 +53,8 @@ class Terraspace::CLI
|
|
47
53
|
end
|
48
54
|
memoize :terraform_bin
|
49
55
|
|
50
|
-
#
|
56
|
+
# Sometimes Terraform shows the version info on the first line and sometimes on the bottom line.
|
57
|
+
# Account for that by finding the line.
|
51
58
|
#
|
52
59
|
# $ terraform --version
|
53
60
|
# Terraform v0.12.24
|
@@ -56,7 +63,7 @@ class Terraspace::CLI
|
|
56
63
|
# is 0.12.26. You can update by downloading from https://www.terraform.io/downloads.html
|
57
64
|
#
|
58
65
|
def terraform_version_message
|
59
|
-
`terraform --version`.split("\n").
|
66
|
+
`terraform --version`.split("\n").find { |l| l =~ /^Terraform / }.strip
|
60
67
|
end
|
61
68
|
memoize :terraform_version_message
|
62
69
|
|
data/lib/terraspace/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|