belt 0.3.35 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/belt/cli/frontend_deploy_command.rb +11 -1
- data/lib/belt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2e326b668a9c84c05be3a8b67b079fe62477131ea5d6bf7f641cc791c9ecf484
|
|
4
|
+
data.tar.gz: 1d7d72326e7941a6fccb5474a9e659f72f62120e5b3212d0331c7d2229e99ab9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a5f09abb9d336b745fb4387b980c099436cf7b5a170b7ac48b0bce1e8104c964cb565213b1cd959edc498c8d1fbba491bd0066cf0d6dae45ef2ff89eaa9c31a
|
|
7
|
+
data.tar.gz: 4ae1253f78503c66853b54de458f577e25c13a95e3616021264c25cbc7090ec389ec6aef7b2fc5bd6bbb28256509bda6a4e2b1a008b936969807efc35c7da9dd
|
|
@@ -4,8 +4,10 @@ require 'shellwords'
|
|
|
4
4
|
require 'open3'
|
|
5
5
|
require_relative 'app_detection'
|
|
6
6
|
require_relative 'env_resolver'
|
|
7
|
+
require_relative 'environment_config'
|
|
7
8
|
require_relative 'frontend_env_map'
|
|
8
9
|
require_relative 'frontend_registry'
|
|
10
|
+
require_relative 'terraform_command'
|
|
9
11
|
|
|
10
12
|
module Belt
|
|
11
13
|
module CLI
|
|
@@ -54,11 +56,13 @@ module Belt
|
|
|
54
56
|
def initialize(env, frontend: nil)
|
|
55
57
|
@env = env
|
|
56
58
|
@app_name = detect_app_name
|
|
57
|
-
@
|
|
59
|
+
@infra_dir = TerraformCommand.find_infrastructure_dir || 'infrastructure'
|
|
60
|
+
@env_dir = File.join(@infra_dir, @env)
|
|
58
61
|
@frontend = frontend || FrontendRegistry.new.resolve!
|
|
59
62
|
end
|
|
60
63
|
|
|
61
64
|
def run
|
|
65
|
+
load_and_apply_env_config!
|
|
62
66
|
validate!
|
|
63
67
|
puts "━━━ #{@frontend.label} (#{@frontend.path}/) ━━━"
|
|
64
68
|
build_frontend
|
|
@@ -71,6 +75,12 @@ module Belt
|
|
|
71
75
|
|
|
72
76
|
private
|
|
73
77
|
|
|
78
|
+
def load_and_apply_env_config!
|
|
79
|
+
env_config = EnvironmentConfig.load(@env, infra_dir: @infra_dir)
|
|
80
|
+
env_config.apply!
|
|
81
|
+
puts " 🔑 Using AWS profile: #{env_config.aws_profile}" if env_config.aws_profile?
|
|
82
|
+
end
|
|
83
|
+
|
|
74
84
|
def validate!
|
|
75
85
|
unless Dir.exist?(@frontend.path)
|
|
76
86
|
abort "Error: No #{@frontend.path}/ directory found. " \
|
data/lib/belt/version.rb
CHANGED