bard 0.30.0 → 0.31.0

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: 719e47d893872fefe3cfd4dfe73ddb4f68d10ad9
4
- data.tar.gz: a3b3e76ac8fc203fe45d517b7655b5e2bbaab062
3
+ metadata.gz: 118cdc90f0fe871bca1291c6580df2b2509407a7
4
+ data.tar.gz: c0ec7b3c7887e429efd27a287d12ca54e69ad9b8
5
5
  SHA512:
6
- metadata.gz: 2a2924218f5827b6b65b28005d5268cab74cefc234ef6b52f08b28d15ea3314cf003a54179c233c86893136f49c847980b48588711f20c7eb0ce0c3c7adc146c
7
- data.tar.gz: 7bc7b1940e0984957315ee22845f363cd3657bb172cb12cae68c22befcdf6486a533901a76a086482b6d01b05e0df00824c477cc642d7f13720e2d2a5ad0c72f
6
+ metadata.gz: c53feddb47ab67e81477721e8c9aa037d87d70d7cfd0b58577b33274abd7ec9792005e863bae19e5776f56e1881e8297839997c51ea2367865ad5197d1684db6
7
+ data.tar.gz: 3a99fbcff021027796397131b97f0be1424b394f9575ab03216750415a94116d5cc80489657652bdd7c1ccdaf793f322c3c5a4d3e531abbf7ff1071fcc3b0d15
@@ -38,10 +38,8 @@ class Bard::CLI < Thor
38
38
  end
39
39
 
40
40
  method_options %w( verbose -v ) => :boolean, %w( skip-ci ) => :boolean
41
- desc "deploy", "checks that branch is a ff with master, checks with ci, and then merges into master and deploys to production, and deletes branch."
42
- def deploy
43
- branch = Git.current_branch
44
-
41
+ desc "deploy [BRANCH=HEAD]", "checks that branch is a ff with master, checks with ci, and then merges into master and deploys to production, and deletes branch."
42
+ def deploy branch=Git.current_branch
45
43
  if branch == "master"
46
44
  run_crucial "git push origin master:master"
47
45
  invoke :ci unless options["skip-ci"]
@@ -82,11 +80,11 @@ class Bard::CLI < Thor
82
80
  end
83
81
 
84
82
  method_options %w( verbose -v ) => :boolean
85
- desc "ci", "runs ci against current HEAD"
86
- def ci
87
- ci = CI.new(project_name, Git.current_sha)
83
+ desc "ci [BRANCH=HEAD]", "runs ci against BRANCH"
84
+ def ci branch=Git.current_branch
85
+ ci = CI.new(project_name, `git rev-parse #{branch}`.chomp)
88
86
  if ci.exists?
89
- puts "Continuous integration: starting build on #{Git.current_branch}..."
87
+ puts "Continuous integration: starting build on #{branch}..."
90
88
 
91
89
  success = ci.run do |elapsed_time, last_time|
92
90
  if last_time
@@ -1,5 +1,5 @@
1
1
  class Bard::CLI < Thor
2
- class CI < Struct.new(:project_name, :current_sha)
2
+ class CI < Struct.new(:project_name, :sha)
3
3
  def run
4
4
  last_time_elapsed = get_last_time_elapsed
5
5
  start
@@ -39,7 +39,7 @@ class Bard::CLI < Thor
39
39
  end
40
40
 
41
41
  def start
42
- command = "curl -s -I -X POST '#{ci_host}/buildWithParameters?token=botandrose&GIT_REF=#{current_sha}'"
42
+ command = "curl -s -I -X POST '#{ci_host}/buildWithParameters?token=botandrose&GIT_REF=#{sha}'"
43
43
  output = `#{command}`
44
44
  @queueId = output[%r{Location: .+/queue/item/(\d+)/}, 1].to_i
45
45
  end
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "0.30.0"
2
+ VERSION = "0.31.0"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-08 00:00:00.000000000 Z
11
+ date: 2018-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor