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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9cc6005046b0480f59f0ddd824b42ce3db5b4fc
4
- data.tar.gz: ef97ccf9b0486fe4222cce699372fbb1aa291c96
3
+ metadata.gz: 8a6e0bd04718a7bf03cc892ee4f21430326ec42a
4
+ data.tar.gz: 621ccb43b332ed713eb75ecc150feb52f2307417
5
5
  SHA512:
6
- metadata.gz: 201d6e780955bd86311528ee7ed3109f3319018b6fd61a903b92a1b6b65ab32e68bb121536d3ce7ad91ec6b02b31c19a827c20aca542a915161123b006d0e82a
7
- data.tar.gz: 7892a5234d19ee8bfab1a20395ca22d046676ab073d2189b33ff071bc947b7e6a0619bbbe22f5a2ce2b8fb685d40dd68bb5e83f0d1cf96c79e3d69c246370d95
6
+ metadata.gz: b15c2ebec03f524de7b927a4e75f0e1727a244caa4e0de270ad102b09fa14ff587215922cc5b139911cc6f8206551af4be2029c40f235d63371d1c31314f8b78
7
+ data.tar.gz: 24d0b9aaf4e581c7ee4d31380be9cce5c0c8c4644f44e5eb7430c572eec514fa6f52b5f778603043de9a79d22c768d650752ccc279e5ed0ee3bed5583c91ed44
@@ -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: true)
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: true)
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: true)
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
- new_branch = "release_#{date}"
164
+ new_release_branch = "release_#{date}"
161
165
 
162
- if BbDeploy::Git.local_release(new_branch).present?
163
- exit_with_message("There already exists a local release branch named #{new_branch}!")
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(new_branch).present?
167
- exit_with_message("There already exists a remote release branch named #{new_branch}!")
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
@@ -1,3 +1,5 @@
1
+ require 'le'
2
+
1
3
  # Helper file for Logging/Slack notifications
2
4
  module BbDeploy::Logger
3
5
  def self.logger(phase)
data/lib/bb_deploy.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'pry'
2
-
3
1
  module BbDeploy
4
2
  require 'bb_deploy/railtie' if defined?(Rails)
5
3
  require 'bb_deploy/deployer'
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.1
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