Skip to content

Commit

Permalink
Merge pull request #355 from k1LoW/fix-ci
Browse files Browse the repository at this point in the history
Fix CI / Update go version
  • Loading branch information
k1LoW authored May 28, 2022
2 parents e3b87b3 + d75913a commit bfff339
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest]
go_version: [1.17]
go_version: [1.18]
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go ${{ matrix.go_version }} on ${{ matrix.platform }}
Expand All @@ -29,7 +29,7 @@ jobs:
uses: isbang/[email protected]

- name: Check out source code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Decrypt secrets
run: gpg --quiet --batch --yes --decrypt --passphrase="$GCP_CLIENT_SECRETS_PASSPHRASE" --output $GITHUB_WORKSPACE/client_secrets.json $GITHUB_WORKSPACE/client_secrets.json.gpg
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
strategy:
matrix:
platform: [windows-latest]
go_version: [1.17]
go_version: [1.18]
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go ${{ matrix.go_version }} on ${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ depsdev:
go install github.com/Songmu/ghch/cmd/[email protected]
go install github.com/xo/[email protected]
go install github.com/Songmu/gocredits/cmd/[email protected]
go install github.com/securego/gosec/cmd/gosec@master
go install github.com/securego/gosec/v2/cmd/gosec@latest

prerelease:
git pull origin --tag
Expand Down
3 changes: 2 additions & 1 deletion cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ package cmd
import (
"fmt"
"os"
"path/filepath"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -66,7 +67,7 @@ tbls completion fish ~/.config/fish/completions/tbls.fish
if out == "" {
o = os.Stdout
} else {
o, err = os.Create(out)
o, err = os.Create(filepath.Clean(out))
if err != nil {
return errors.WithStack(err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/k1LoW/tbls

go 1.17
go 1.18

require (
cloud.google.com/go/bigquery v1.25.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk=
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
Expand Down Expand Up @@ -252,7 +251,6 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
github.com/goccy/go-graphviz v0.0.9 h1:s/FMMJ1Joj6La3S5ApO3Jk2cwM4LpXECC2muFx3IPQQ=
github.com/goccy/go-graphviz v0.0.9/go.mod h1:wXVsXxmyMQU6TN3zGRttjNn3h+iCAS7xQFC6TlNvLhk=
github.com/goccy/go-json v0.4.8/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goccy/go-yaml v1.9.3/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA=
github.com/goccy/go-yaml v1.9.4 h1:S0GCYjwHKVI6IHqio7QWNKNThUl6NLzFd/g8Z65Axw8=
github.com/goccy/go-yaml v1.9.4/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
Expand Down
4 changes: 2 additions & 2 deletions output/md/md.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func Output(s *schema.Schema, c *config.Config, force bool) (e error) {
}

// README.md
file, err := os.Create(filepath.Join(fullPath, "README.md"))
file, err := os.Create(filepath.Clean(filepath.Join(fullPath, "README.md")))
defer func() {
err := file.Close()
if err != nil {
Expand All @@ -156,7 +156,7 @@ func Output(s *schema.Schema, c *config.Config, force bool) (e error) {

// tables
for _, t := range s.Tables {
file, err := os.Create(filepath.Join(fullPath, fmt.Sprintf("%s.md", t.Name)))
file, err := os.Create(filepath.Clean(filepath.Join(fullPath, fmt.Sprintf("%s.md", t.Name))))
if err != nil {
_ = file.Close()
return errors.WithStack(err)
Expand Down

0 comments on commit bfff339

Please sign in to comment.