Skip to content

Commit

Permalink
fix(mkdocs): fix mkdocs GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
FalcoSuessgott committed Nov 3, 2024
1 parent 90f1e50 commit e4f59de
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP: ${{ secrets.HOMEBREW_TAP }}
# if no tag test release build
-
name: Run GoReleaser skip publishing
Expand All @@ -60,3 +61,4 @@ jobs:
args: release --skip=publish --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP: ${{ secrets.HOMEBREW_TAP }}
21 changes: 21 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,24 @@ changelog:
order: 400
- title: Other work
order: 9999

brews:
- name: vkv
repository:
owner: FalcoSuessgott
name: homebrew-tap
branch: main
token: "{{ .Env.HOMEBREW_TAP }}"
directory: Formula
homepage: "https://falcosuessgott.github.io/vkv/"
description: "vkv"
install: |
bin.install "vkv"
bash_output = Utils.safe_popen_read(bin/"vkv", "completion", "bash")
(bash_completion/"vkv").write bash_output
zsh_output = Utils.safe_popen_read(bin/"vkv", "completion", "zsh")
(zsh_completion/"vkv").write zsh_output
fish_output = Utils.safe_popen_read(bin/"vkv", "completion", "fish")
(fish_completion/"vkv.fish").write fish_output
test: |
system "#{bin}/vkv version"
12 changes: 6 additions & 6 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmd

import (
"bytes"
"fmt"
"io"
"log"
"runtime"
Expand Down Expand Up @@ -67,7 +66,7 @@ func (s *VaultSuite) TestMode() {
expected: `e2e/ [type=kv2]
├── sub [v=1]
│ └── user=********
└── sub2 [v=1]
└── key=*****
`,
Expand Down Expand Up @@ -103,12 +102,13 @@ func (s *VaultSuite) TestMode() {
}

err := NewRootCmd().Execute()
fmt.Println(err)

// run vkv
s.Require().Equal(tc.err, err != nil, "error "+tc.name)
if tc.err {
s.Require().Error(err, "error "+tc.name)
} else {
s.Require().NoError(err, "no error "+tc.name)

// assert output
if !tc.err {
out, _ := io.ReadAll(b)
s.Require().Equal(tc.expected, string(out), tc.name)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/fs/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestReadFile(t *testing.T) {
{
name: "valid",
path: "testdata/file_1.txt",
content: []byte("Hello World"),
content: []byte("Hello World\n"),
err: false,
},
{
Expand Down

0 comments on commit e4f59de

Please sign in to comment.