bard 1.9.4 → 1.9.5
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/bard/cli/deploy.rb +2 -2
- data/lib/bard/deploy_strategy/github_pages.rb +1 -1
- data/lib/bard/version.rb +1 -1
- data/spec/bard/cli/deploy_spec.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d5acbc3e0a86aae1981b7bae5706a46e4029a8ea478dcd22fb7556a64b704fd
|
|
4
|
+
data.tar.gz: 6341214a33f8f83e4b708bd21be4b6befbaba2655530927e2d38a59aff7f5fb4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d51a2580abb4620389077c93029195496c37a330bcc163eaa9ed7e7c2c8f7d8c7bc099b99bbc08fb6724575ede7a739e98d7db0c042335d2fca0a3bd407f5afe
|
|
7
|
+
data.tar.gz: f6dea9e844e74edbafa46e9bfdc943d750705a314cf4f64b80fcb3a58e0a35d2d59613ac334faf6b21dfdc730919bbcdbf9112896312bc7f57de9e53c33e5402
|
data/lib/bard/cli/deploy.rb
CHANGED
|
@@ -20,7 +20,7 @@ module Bard::CLI::Deploy
|
|
|
20
20
|
if !Bard::Git.up_to_date_with_remote?(branch)
|
|
21
21
|
run! "git push origin #{branch}:#{branch}"
|
|
22
22
|
end
|
|
23
|
-
invoke :ci, [branch], options.slice("local-ci", "ci") unless options["skip-ci"]
|
|
23
|
+
invoke :ci, [branch], options.slice("local-ci", "ci") unless options["skip-ci"] || config.ci == false
|
|
24
24
|
|
|
25
25
|
else
|
|
26
26
|
run! "git fetch origin"
|
|
@@ -55,7 +55,7 @@ module Bard::CLI::Deploy
|
|
|
55
55
|
|
|
56
56
|
run! "git push -f origin #{branch}:#{branch}"
|
|
57
57
|
|
|
58
|
-
invoke :ci, [branch], options.slice("local-ci", "ci") unless options["skip-ci"]
|
|
58
|
+
invoke :ci, [branch], options.slice("local-ci", "ci") unless options["skip-ci"] || config.ci == false
|
|
59
59
|
|
|
60
60
|
run! "git push origin #{branch}:master"
|
|
61
61
|
if Bard::Git.current_branch != "master"
|
data/lib/bard/version.rb
CHANGED
|
@@ -25,6 +25,7 @@ describe Bard::CLI::Deploy do
|
|
|
25
25
|
let(:cli) { TestDeployCLI.new }
|
|
26
26
|
|
|
27
27
|
before do
|
|
28
|
+
allow(config).to receive(:ci).and_return(nil)
|
|
28
29
|
allow(cli).to receive(:config).and_return(config)
|
|
29
30
|
allow(cli).to receive(:options).and_return({ target: "production" })
|
|
30
31
|
allow(cli).to receive(:puts)
|
|
@@ -88,6 +89,17 @@ describe Bard::CLI::Deploy do
|
|
|
88
89
|
cli.deploy
|
|
89
90
|
end
|
|
90
91
|
end
|
|
92
|
+
|
|
93
|
+
context "with ci disabled in config" do
|
|
94
|
+
it "skips CI step" do
|
|
95
|
+
allow(config).to receive(:ci).and_return(false)
|
|
96
|
+
|
|
97
|
+
expect(cli).not_to receive(:invoke).with(:ci, anything, anything)
|
|
98
|
+
expect(production_server).to receive(:run!).with("git pull origin master && bin/setup")
|
|
99
|
+
|
|
100
|
+
cli.deploy
|
|
101
|
+
end
|
|
102
|
+
end
|
|
91
103
|
end
|
|
92
104
|
|
|
93
105
|
context "when on feature branch" do
|
|
@@ -130,6 +142,20 @@ describe Bard::CLI::Deploy do
|
|
|
130
142
|
end
|
|
131
143
|
end
|
|
132
144
|
|
|
145
|
+
context "when on feature branch with ci disabled in config" do
|
|
146
|
+
before do
|
|
147
|
+
allow(cli).to receive(:options).and_return({ target: "production" })
|
|
148
|
+
allow(config).to receive(:ci).and_return(false)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
it "skips CI step" do
|
|
152
|
+
expect(cli).not_to receive(:invoke).with(:ci, anything, anything)
|
|
153
|
+
expect(production_server).to receive(:run!).with("git pull origin master && bin/setup")
|
|
154
|
+
|
|
155
|
+
cli.deploy
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
133
159
|
context "with github remote" do
|
|
134
160
|
it "pushes to github remote" do
|
|
135
161
|
allow(cli).to receive(:`).with("git remote").and_return("origin\ngithub\n")
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bard
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Geisel
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-02-
|
|
10
|
+
date: 2026-02-27 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: thor
|