firespring_dev_commands 2.1.1.pre.alpha.4 → 2.1.1.pre.alpha.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8dab91ae2bd3bcd7d38e4556e579bd785d2a04143fdd24a094bde154b9c65f2e
4
- data.tar.gz: 2c4f44e0ec1b402800f42b591f53d30184b6344ae215f5a240fc0553cf5bd2a0
3
+ metadata.gz: 9e54929040a40491ff1d2b36af03da9c718e2770a507cf29f62ab7b24993b8d8
4
+ data.tar.gz: da2feb3080c1864f22b988b9898a08408c874e29251be018b7f82f7290d5a922
5
5
  SHA512:
6
- metadata.gz: b6c919f2b2c53f1e24ff8918459b708a90a23d1952a7214ca59b25e4fdcc9f47c7b84b6adf212b34f34aa9ca71af53e859e9edf90e46cddfa993e4757781263f
7
- data.tar.gz: 862c605e2ce123a63959bbf27dbd423928a495b6051c087ef9a44974c627d7096e2140e33faf512da272d36e1254c901ead5a3d91ac5dbd4fcd8473c134cc9ac
6
+ metadata.gz: bd65f5fb950c89f42cbb761c39241a0f6fd414f99c22e3b8ae6800bc1361ba46b104dd70e1a890477789db04750d14ab8529db53be96e8917f16d4424b2daa46
7
+ data.tar.gz: 85dd595b1e98265d75c41d24d3a98e72dbafa4d1fd112a04849d37061441251e5018a8295ab38486ccc78622052af98c0e111c0fc3498bf221d06072703be3b7
@@ -69,6 +69,13 @@ module Dev
69
69
  @state = FAILED
70
70
  end
71
71
 
72
+ # Get the cloudformation stack
73
+ def exist?
74
+ !client.describe_stacks(stack_name: name).stacks.empty?
75
+ rescue ::Aws::CloudFormation::Errors::ValidationError
76
+ false
77
+ end
78
+
72
79
  # Update the cloudformation stack
73
80
  def update(should_wait: true)
74
81
  # Call upload function to get the s3 url
@@ -31,6 +31,8 @@ module Dev
31
31
 
32
32
  # Start create on all stacks without waiting so they are created in parallel
33
33
  cloudformations.each do |cloudformation|
34
+ next if cloudformation.exist?
35
+
34
36
  cloudformation.create(should_wait: false)
35
37
  end
36
38
  LOG.info 'Waiting for all stacks to finish create'
@@ -62,6 +64,8 @@ module Dev
62
64
 
63
65
  # Start update on all stacks without waiting so they are updated in parallel
64
66
  cloudformations.each do |cloudformation|
67
+ next unless cloudformation.exist?
68
+
65
69
  cloudformation.update(should_wait: false)
66
70
  end
67
71
  LOG.info 'Waiting for all stacks to finish update'
@@ -93,6 +97,8 @@ module Dev
93
97
 
94
98
  # Start delete on all stacks without waiting so they are deleted in parallel
95
99
  cloudformations.each do |cloudformation|
100
+ next unless cloudformation.exist?
101
+
96
102
  cloudformation.delete(should_wait: false)
97
103
  end
98
104
  LOG.info 'Waiting for all stacks to finish delete'
@@ -6,6 +6,6 @@ module Dev
6
6
  # Use 'v.v.v.pre.alpha.v' for pre-release vesions
7
7
  # Use 'v.v.v.beta.v for beta versions
8
8
  # Use semantic versioning for any releases (https://semver.org/)
9
- VERSION = '2.1.1.pre.alpha.4'.freeze
9
+ VERSION = '2.1.1.pre.alpha.5'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firespring_dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1.pre.alpha.4
4
+ version: 2.1.1.pre.alpha.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-14 00:00:00.000000000 Z
11
+ date: 2023-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport