bard 0.55.0 → 0.57.0
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/install_files/.github/workflows/deploy.yml +26 -0
- data/lib/bard/git.rb +11 -3
- data/lib/bard/version.rb +1 -1
- data/lib/bard.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 185f8659f83ac6f3ddcc4922db94061b58a610d09d1da8bd92de1c30f3be1d3f
|
4
|
+
data.tar.gz: 2552ea154c16e106b64c2e7b4db26eb1a0dfb92e99d5e158a93cc818620de14b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5db740a15a9b346f96ba6cdf1ba2e82841ef5c9f18fa07d7068a47de6d7b7490cb93388622af030e70471905d0ed58c100b73e9c1105ea17754233cbdfec573
|
7
|
+
data.tar.gz: a82d8134445429bf9562c47ec4921a52dc32f81082ef82529d5fd97b1ffa2610f317569496ed577525639720f647194f46c87d1f88ac695242e557313ef3d327
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: deploy
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
types:
|
5
|
+
- closed
|
6
|
+
jobs:
|
7
|
+
deploy:
|
8
|
+
if: github.event.pull_request.merged == true
|
9
|
+
runs-on: ubuntu-20.04
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v3
|
12
|
+
- uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
bundler-cache: true
|
15
|
+
- name: Install SSH key
|
16
|
+
uses: shimataro/ssh-key-action@v2
|
17
|
+
with:
|
18
|
+
key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
|
19
|
+
known_hosts: unnecessary
|
20
|
+
config: |
|
21
|
+
Host *
|
22
|
+
StrictHostKeyChecking no
|
23
|
+
UserKnownHostsFile=/dev/null
|
24
|
+
- name: deploy
|
25
|
+
run: bundle exec bard deploy --skip-ci
|
26
|
+
|
data/lib/bard/git.rb
CHANGED
@@ -8,14 +8,22 @@ module Bard::CLI::Git
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def current_sha
|
11
|
-
|
11
|
+
sha_of("HEAD")
|
12
12
|
end
|
13
13
|
|
14
14
|
def fast_forward_merge?(root, branch)
|
15
|
-
root_head =
|
16
|
-
branch_head =
|
15
|
+
root_head = sha_of(root)
|
16
|
+
branch_head = sha_of(branch)
|
17
17
|
common_ancestor = `git merge-base #{root_head} #{branch_head}`.chomp
|
18
18
|
common_ancestor == root_head
|
19
19
|
end
|
20
|
+
|
21
|
+
def up_to_date_with_remote? branch
|
22
|
+
sha_of(branch) == sha_of("origin/#{branch}")
|
23
|
+
end
|
24
|
+
|
25
|
+
def sha_of ref
|
26
|
+
`git rev-parse #{ref}`.chomp
|
27
|
+
end
|
20
28
|
end
|
21
29
|
|
data/lib/bard/version.rb
CHANGED
data/lib/bard.rb
CHANGED
@@ -40,7 +40,7 @@ class Bard::CLI < Thor
|
|
40
40
|
branch = Git.current_branch
|
41
41
|
|
42
42
|
if branch == "master"
|
43
|
-
run_crucial "git push origin
|
43
|
+
run_crucial "git push origin #{branch}:#{branch}" if !Git.up_to_date_with_remote?(branch)
|
44
44
|
invoke :ci, [branch], options.slice("local-ci") unless options["skip-ci"]
|
45
45
|
|
46
46
|
else
|
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.57.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: 2024-01-
|
11
|
+
date: 2024-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -140,6 +140,7 @@ files:
|
|
140
140
|
- features/support/io.rb
|
141
141
|
- install_files/.github/workflows/cache-ci.yml
|
142
142
|
- install_files/.github/workflows/ci.yml
|
143
|
+
- install_files/.github/workflows/deploy.yml
|
143
144
|
- install_files/apt_dependencies.rb
|
144
145
|
- install_files/ci
|
145
146
|
- install_files/setup
|
@@ -179,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
180
|
- !ruby/object:Gem::Version
|
180
181
|
version: '0'
|
181
182
|
requirements: []
|
182
|
-
rubygems_version: 3.
|
183
|
+
rubygems_version: 3.5.4
|
183
184
|
signing_key:
|
184
185
|
specification_version: 4
|
185
186
|
summary: CLI to automate common development tasks.
|