Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Fix ci (#117)
Browse files Browse the repository at this point in the history
* fix: correct issue with single file path going to root

found issue where if a single file is specified in instructions
that file tries to write to root which causes a read only file system error

Signed-off-by: Jeff Davis <[email protected]>

* ci: correct release and linter issues

Signed-off-by: Jeff Davis <[email protected]>

* ci: disable static err check on test

Signed-off-by: Jeff Davis <[email protected]>
  • Loading branch information
Jeff Davis authored Mar 19, 2022
1 parent 01eedd6 commit 32dca5d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Snapcraft Login
if: startsWith(github.ref, 'refs/tags/v')
run: |
snapcraft login --with <(echo "${{ secrets.SNAPCRAFT_LOGIN }}")
#-
# name: Snapcraft Login
# if: startsWith(github.ref, 'refs/tags/v')
# run: |
# snapcraft login --with <(echo "${{ secrets.SNAPCRAFT_LOGIN }}")
-
name: Import GPG key
id: import_gpg
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ linters:
# - exhaustivestruct
- exportloopref
- forbidigo
- forcetypeassert
#- forcetypeassert
- funlen
- gci
- gochecknoglobals
Expand Down
27 changes: 13 additions & 14 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ dockers:
- 'ghcr.io/vmware-tanzu-labs/yot:v{{ .Version }}'
- 'ghcr.io/vmware-tanzu-labs/yot:latest'
dockerfile: Dockerfile
use_buildx: true
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
Expand Down Expand Up @@ -144,16 +143,16 @@ nfpms:
- rpm
recommends:
- kubectl
snapcrafts:
- name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
name: yaml-overlay-tool
summary: "A YAML Overlay Tool with templating tendencies."
description: |
YAML Overlay Tool, or Yot for short, often pronounced /yaucht/, is a tool
to assist with patching YAML files. Yot uses JSONPath to query YAML documents
within YAML files, and to perform a change. YAML Overlay Tool operates on YAML
nodes. It is able to preserve and inject head, foot, and line comments into the
new output versions of the files that you manipulate.
grade: stable
confinement: strict
publish: true
# snapcrafts:
# - name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
# name: yaml-overlay-tool
# summary: "A YAML Overlay Tool with templating tendencies."
# description: |
# YAML Overlay Tool, or Yot for short, often pronounced /yaucht/, is a tool
# to assist with patching YAML files. Yot uses JSONPath to query YAML documents
# within YAML files, and to perform a change. YAML Overlay Tool operates on YAML
# nodes. It is able to preserve and inject head, foot, and line comments into the
# new output versions of the files that you manipulate.
# grade: stable
# confinement: strict
# publish: true
2 changes: 1 addition & 1 deletion internal/actions/actions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (tst testCases) runTests(t *testing.T, a string) {
results, _ := yp.Find(testYaml)

if err := testAction(t, a, results[0], testYaml, val.Content...); (err != nil) != testCase.wantErr {
t.Errorf("Error: %w, WantErr: %v", err, testCase.wantErr)
t.Errorf("Error: %v, WantErr: %v", err, testCase.wantErr)
}

buf := new(bytes.Buffer)
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/completion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestCompletions(t *testing.T) {

defer func() {
if err := recover(); err != nil {
newErr := fmt.Errorf("%w", err)
newErr := fmt.Errorf("%v", err) //nolint

if !test.wantErr && newErr != nil {
t.Errorf("Completions() error = %v, wantErr %v", err, test.wantErr)
Expand Down

0 comments on commit 32dca5d

Please sign in to comment.