Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI / Update go version #355

Merged
merged 3 commits into from
May 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}
@@ -29,7 +29,7 @@ jobs:
uses: isbang/setup-awscli@v0.1.0

- 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
@@ -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 }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ depsdev:
go install github.com/Songmu/ghch/cmd/ghch@v0.10.2
go install github.com/xo/usql@v0.9.5
go install github.com/Songmu/gocredits/cmd/gocredits@v0.2.0
go install github.com/securego/gosec/cmd/gosec@master
go install github.com/securego/gosec/v2/cmd/gosec@latest

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

"github.com/pkg/errors"
"github.com/spf13/cobra"
@@ -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)
}
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
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
@@ -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=
4 changes: 2 additions & 2 deletions output/md/md.go
Original file line number Diff line number Diff line change
@@ -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 {
@@ -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)