dogids-cli 0.0.26 → 0.0.27

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
  SHA1:
3
- metadata.gz: d353d01767ddfac98eb392913bfa489154ae5919
4
- data.tar.gz: 5671fbbd059309f56975438c141fecb07b326ad0
3
+ metadata.gz: bb9ca37428031dab4d21924eb4bbc3e5568cb334
4
+ data.tar.gz: c0c53d7eb178553500ffd155086fc950f27aa3d5
5
5
  SHA512:
6
- metadata.gz: b2d9f36bc37fd4a3dddf951202f9dc37c901d7582341f9ee470c3f535090094accac030ff6a1952fbad73bd6a800fb4697363b58323c476e817b1a6a6a337496
7
- data.tar.gz: 6d7b3c265ce4c085b3628d26603c1190e6c66df4d80ca00d272bb2c4a07540822bc52583ae9330b12566374c46b52808922b0078e0df6379db1364d1297fb9fc
6
+ metadata.gz: 85ac574cb597b18f263da43af5903807b55796fc99b5b4685e81f573d222624cda0817c088e2801c78485006dd137ed41ab9c737277b4e3dc77df0c8ebab4dcd
7
+ data.tar.gz: 87e3168b541c9bf30aded06c72d44cb0b4880ee7228f49478359b489a3c2a2adaa840f628448a0841d7a3d3b283aa8bbb83f958c795a7b19296d5cc2102284ac
data/dogids_cli.gemspec CHANGED
@@ -5,7 +5,7 @@ require "dogids/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "dogids-cli"
8
- spec.version = "0.0.26"
8
+ spec.version = Dogids::VERSION
9
9
  spec.authors = ["Jaryd Krishnan"]
10
10
  spec.email = ["jaryd@dogids.com"]
11
11
  spec.summary = "Command line tool for dogIDs tasks"
@@ -46,6 +46,12 @@ module Dogids
46
46
  ssh.exec!(web_update_permissions_command) do |_channel, _stream, data|
47
47
  print_command(data)
48
48
  end
49
+
50
+ git_sha = "Unknown"
51
+ ssh.exec!(web_git_get_sha) do |_channel, _stream, data|
52
+ git_sha = data.strip
53
+ end
54
+ print_command("Current git SHA: #{git_sha}")
49
55
  end
50
56
  end
51
57
 
@@ -33,6 +33,27 @@ module Dogids
33
33
  ssh.exec!(web_update_permissions_command) do |_channel, _stream, data|
34
34
  print_command(data)
35
35
  end
36
+
37
+ git_sha = "Unknown"
38
+ ssh.exec!(web_git_get_sha) do |_channel, _stream, data|
39
+ git_sha = data.strip
40
+ end
41
+ print_command("Current git SHA: #{git_sha}")
42
+
43
+ print_command("Sending release to sentry")
44
+ ssh.exec!(web_sentry_create_release(git_sha)) do |_channel, _stream, data|
45
+ print_command(data)
46
+ end
47
+ ssh.exec!(web_sentry_set_commits(git_sha)) do |_channel, _stream, data|
48
+ print_command(data)
49
+ end
50
+ ssh.exec!(web_sentry_finalize(git_sha)) do |_channel, _stream, data|
51
+ print_command(data)
52
+ end
53
+ print_command("Sending deployment to sentry")
54
+ ssh.exec!(web_sentry_deploy(git_sha)) do |_channel, _stream, data|
55
+ print_command(data)
56
+ end
36
57
  end
37
58
  end
38
59
  end
@@ -63,6 +84,13 @@ module Dogids
63
84
  commands << "git pull origin master"
64
85
  commands.join("&& ")
65
86
  end
87
+
88
+ def web_git_get_sha
89
+ commands = []
90
+ commands << "cd /home/dogids/apps/dogids.com"
91
+ commands << "git log --pretty='%H' -n1 HEAD"
92
+ commands.join("&& ")
93
+ end
66
94
 
67
95
  def web_git_status_command
68
96
  commands = []
@@ -94,5 +122,35 @@ module Dogids
94
122
 
95
123
  commands.join("&& ")
96
124
  end
125
+
126
+ ### SENTRY COMMANDS ###
127
+ def web_sentry_create_release(git_sha)
128
+ commands = []
129
+ commands << "cd /home/dogids/apps/dogids.com"
130
+ commands << "sentry-cli releases new #{git_sha}"
131
+ commands.join(" && ")
132
+ end
133
+
134
+ def web_sentry_set_commits(git_sha)
135
+ commands = []
136
+ commands << "cd /home/dogids/apps/dogids.com"
137
+ commands << "sentry-cli releases set-commits #{git_sha} --auto"
138
+ commands.join(" && ")
139
+ end
140
+
141
+ def web_sentry_finalize(git_sha)
142
+ commands = []
143
+ commands << "cd /home/dogids/apps/dogids.com"
144
+ commands << "sentry-cli releases finalize #{git_sha}"
145
+ commands.join(" && ")
146
+ end
147
+
148
+ def web_sentry_deploy(git_sha)
149
+ commands = []
150
+ commands << "cd /home/dogids/apps/dogids.com"
151
+ commands << "sentry-cli releases deploys #{git_sha} new -e production"
152
+ commands.join(" && ")
153
+ end
154
+ ### END SENTRY COMMANDS ###
97
155
  end
98
156
  end
@@ -3,7 +3,7 @@ require "open-uri"
3
3
  require "thor"
4
4
 
5
5
  module Dogids
6
- VERSION = "0.0.19"
6
+ VERSION = "0.0.27"
7
7
 
8
8
  class Cli < Thor
9
9
  desc "update", "Update dogids-cli to latest version"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dogids-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaryd Krishnan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh