bb_deploy 0.0.0.1 → 0.0.0.2
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/bb_deploy/deployer.rb +13 -9
- data/lib/bb_deploy/logger.rb +2 -0
- data/lib/bb_deploy.rb +0 -2
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a6e0bd04718a7bf03cc892ee4f21430326ec42a
|
4
|
+
data.tar.gz: 621ccb43b332ed713eb75ecc150feb52f2307417
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b15c2ebec03f524de7b927a4e75f0e1727a244caa4e0de270ad102b09fa14ff587215922cc5b139911cc6f8206551af4be2029c40f235d63371d1c31314f8b78
|
7
|
+
data.tar.gz: 24d0b9aaf4e581c7ee4d31380be9cce5c0c8c4644f44e5eb7430c572eec514fa6f52b5f778603043de9a79d22c768d650752ccc279e5ed0ee3bed5583c91ed44
|
data/lib/bb_deploy/deployer.rb
CHANGED
@@ -36,6 +36,10 @@ class BbDeploy::Deployer
|
|
36
36
|
|
37
37
|
private
|
38
38
|
|
39
|
+
def notify_eng_hub?
|
40
|
+
BbDeploy::Config.application_name == "Clarity"
|
41
|
+
end
|
42
|
+
|
39
43
|
def dputs(*msgs)
|
40
44
|
asterisks = "*" * 80
|
41
45
|
puts asterisks
|
@@ -51,7 +55,7 @@ class BbDeploy::Deployer
|
|
51
55
|
def do_deploy
|
52
56
|
branch = current_branch
|
53
57
|
|
54
|
-
chat_broadcast(":alert: '#{ENV['USER']}' is deploying the #{BbDeploy::Config.application_name} branch '#{branch}' to '#{phase}' :alert:", phase: phase, notify_eng_hub:
|
58
|
+
chat_broadcast(":alert: '#{ENV['USER']}' is deploying the #{BbDeploy::Config.application_name} branch '#{branch}' to '#{phase}' :alert:", phase: phase, notify_eng_hub: notify_eng_hub?)
|
55
59
|
|
56
60
|
do_heroku_deploy!
|
57
61
|
|
@@ -63,7 +67,7 @@ class BbDeploy::Deployer
|
|
63
67
|
puts "You must now resolve any conflicts in the merge and then `git push origin master` ..."
|
64
68
|
end
|
65
69
|
|
66
|
-
chat_broadcast(":alertgreen: Deployment of the #{BbDeploy::Config.application_name} branch '#{branch}' to '#{phase}' completed! :alertgreen:", phase: phase, notify_eng_hub:
|
70
|
+
chat_broadcast(":alertgreen: Deployment of the #{BbDeploy::Config.application_name} branch '#{branch}' to '#{phase}' completed! :alertgreen:", phase: phase, notify_eng_hub: notify_eng_hub?)
|
67
71
|
end
|
68
72
|
|
69
73
|
def logger
|
@@ -115,7 +119,7 @@ class BbDeploy::Deployer
|
|
115
119
|
time_spent = Time.zone.at(Time.current - started_at).getutc.strftime("%H:%M:%S")
|
116
120
|
# The only time started_on_master is non-nil is when creating a new staging branch
|
117
121
|
if started_on_master?
|
118
|
-
chat_broadcast("Yo, @jake - the #{BbDeploy::Config.application_name} branch '#{current_branch}' contains migrations that take #{time_spent} to run", phase: phase, notify_eng_hub:
|
122
|
+
chat_broadcast("Yo, @jake - the #{BbDeploy::Config.application_name} branch '#{current_branch}' contains migrations that take #{time_spent} to run", phase: phase, notify_eng_hub: notify_eng_hub?)
|
119
123
|
end
|
120
124
|
end
|
121
125
|
|
@@ -157,17 +161,17 @@ class BbDeploy::Deployer
|
|
157
161
|
|
158
162
|
if do_it
|
159
163
|
date = Time.zone.today.to_s(:db).tr('-', '_')
|
160
|
-
|
164
|
+
new_release_branch = "release_#{date}"
|
161
165
|
|
162
|
-
if BbDeploy::Git.local_release(
|
163
|
-
exit_with_message("There already exists a local release branch named #{
|
166
|
+
if BbDeploy::Git.local_release(new_release_branch).present?
|
167
|
+
exit_with_message("There already exists a local release branch named #{new_release_branch}!")
|
164
168
|
end
|
165
169
|
|
166
|
-
if BbDeploy::Git.remote_release(
|
167
|
-
exit_with_message("There already exists a remote release branch named #{
|
170
|
+
if BbDeploy::Git.remote_release(new_release_branch).present?
|
171
|
+
exit_with_message("There already exists a remote release branch named #{new_release_branch}!")
|
168
172
|
end
|
169
173
|
|
170
|
-
BbDeploy::Git.push_release_branch!
|
174
|
+
BbDeploy::Git.push_release_branch!(new_release_branch)
|
171
175
|
|
172
176
|
started_on_master!
|
173
177
|
end
|
data/lib/bb_deploy/logger.rb
CHANGED
data/lib/bb_deploy.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bb_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter van Wesep
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: pry
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: highline
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|