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 +4 -4
- data/lib/bard.rb +6 -8
- data/lib/bard/ci.rb +2 -2
- data/lib/bard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 118cdc90f0fe871bca1291c6580df2b2509407a7
|
4
|
+
data.tar.gz: c0ec7b3c7887e429efd27a287d12ca54e69ad9b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c53feddb47ab67e81477721e8c9aa037d87d70d7cfd0b58577b33274abd7ec9792005e863bae19e5776f56e1881e8297839997c51ea2367865ad5197d1684db6
|
7
|
+
data.tar.gz: 3a99fbcff021027796397131b97f0be1424b394f9575ab03216750415a94116d5cc80489657652bdd7c1ccdaf793f322c3c5a4d3e531abbf7ff1071fcc3b0d15
|
data/lib/bard.rb
CHANGED
@@ -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
|
86
|
-
def ci
|
87
|
-
ci = CI.new(project_name,
|
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 #{
|
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
|
data/lib/bard/ci.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Bard::CLI < Thor
|
2
|
-
class CI < Struct.new(:project_name, :
|
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=#{
|
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
|
data/lib/bard/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|