Skip to content

Commit

Permalink
Bump golang version and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
maetthu committed Dec 9, 2022
1 parent c8c5cb2 commit 728c910
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 583 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.19

- name: Run tests
run: go test -v ./...


16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Unshallow
run: git fetch --prune --unshallow
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.19

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
Expand Down
2 changes: 1 addition & 1 deletion .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ vet:
@go vet ${PKG_LIST}

lint:
@for file in ${GO_FILES} ; do \
golint $$file ; \
done
golangci-lint run

fmt:
@gofmt -l -w -s ${GO_FILES}
Expand Down
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var rootCmd = &cobra.Command{
Use: "ghupload",
Short: "Uploads a file to github repository",
SilenceErrors: true,
SilenceUsage: true,
Version: fmt.Sprintf("%s-%s", version.Version, version.Commit),
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v48/github"
"github.com/invit/ghupload/internal/lib/client"
"github.com/invit/ghupload/internal/lib/repourl"
"github.com/spf13/cobra"
Expand Down
28 changes: 20 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
module github.com/invit/ghupload

go 1.16
go 1.19

require (
github.com/google/go-github/v33 v33.0.0
github.com/google/go-querystring v1.1.0 // indirect
github.com/spf13/cobra v1.2.1
github.com/google/go-github/v48 v48.1.0
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.7.0
github.com/whilp/git-urls v1.0.0
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
google.golang.org/protobuf v1.27.1 // indirect
golang.org/x/oauth2 v0.3.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/net v0.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
575 changes: 20 additions & 555 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions internal/lib/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package client
import (
"context"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v48/github"
"golang.org/x/oauth2"
)

// New returns new github client
// New returns new GitHub client
func New(ctx context.Context, token string) (*github.Client, error) {
ts := oauth2.StaticTokenSource(
&oauth2.Token{AccessToken: token},
Expand Down

0 comments on commit 728c910

Please sign in to comment.