bard 1.9.3 → 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/provision/apt.rb +1 -1
- data/lib/bard/provision/mysql.rb +2 -2
- data/lib/bard/version.rb +1 -1
- data/spec/bard/cli/deploy_spec.rb +26 -0
- data/spec/bard/provision/apt_spec.rb +1 -1
- 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/provision/apt.rb
CHANGED
|
@@ -7,7 +7,7 @@ class Bard::Provision::Apt < Bard::Provision
|
|
|
7
7
|
%(echo "\\$nrconf{restart} = \\"a\\";" | sudo tee /etc/needrestart/conf.d/90-autorestart.conf),
|
|
8
8
|
"sudo apt-get update -y",
|
|
9
9
|
"sudo apt-get upgrade -y",
|
|
10
|
-
"sudo apt-get install -y curl",
|
|
10
|
+
"sudo apt-get install -y curl build-essential",
|
|
11
11
|
].join("; "), home: true
|
|
12
12
|
|
|
13
13
|
puts " ✓"
|
data/lib/bard/provision/mysql.rb
CHANGED
|
@@ -7,8 +7,8 @@ class Bard::Provision::MySQL < Bard::Provision
|
|
|
7
7
|
print " Installing,"
|
|
8
8
|
provision_server.run! [
|
|
9
9
|
"sudo apt-get install -y mysql-server",
|
|
10
|
-
%
|
|
11
|
-
%
|
|
10
|
+
%{sudo mysql -uroot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '' PASSWORD EXPIRE NEVER; FLUSH PRIVILEGES;"},
|
|
11
|
+
%{mysql -uroot -e "UPDATE mysql.user SET password_lifetime = NULL WHERE user = 'root' AND host = 'localhost';"},
|
|
12
12
|
].join("; "), home: true
|
|
13
13
|
end
|
|
14
14
|
|
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")
|
|
@@ -20,7 +20,7 @@ describe Bard::Provision::Apt do
|
|
|
20
20
|
%(echo "\\$nrconf{restart} = \\"a\\";" | sudo tee /etc/needrestart/conf.d/90-autorestart.conf),
|
|
21
21
|
"sudo apt-get update -y",
|
|
22
22
|
"sudo apt-get upgrade -y",
|
|
23
|
-
"sudo apt-get install -y curl"
|
|
23
|
+
"sudo apt-get install -y curl build-essential"
|
|
24
24
|
].join("; ")
|
|
25
25
|
|
|
26
26
|
expect(provision_server).to receive(:run!).with(expected_commands, home: true)
|
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
|