Skip to content

Commit

Permalink
feat(deps): bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
odsod committed Jul 26, 2023
1 parent 97bc71a commit b45570a
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @odsod
* @einride/team-cloud-control
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
interval: monthly

- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
interval: monthly

- package-ecosystem: gomod
directory: .sage
schedule:
interval: weekly
interval: monthly
4 changes: 2 additions & 2 deletions .sage/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module sage

go 1.17
go 1.20

require go.einride.tech/sage v0.117.0
require go.einride.tech/sage v0.233.0
4 changes: 2 additions & 2 deletions .sage/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
go.einride.tech/sage v0.117.0 h1:5iHLwcyzCoDVovZoa1qXXBml3BsUq4sU8Lfr8dqeJw4=
go.einride.tech/sage v0.117.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
go.einride.tech/sage v0.233.0 h1:fz7Qi5HEBvtY9uJist4klxoZfNZ0H81T2VCv8oOQ2Uk=
go.einride.tech/sage v0.233.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
18 changes: 13 additions & 5 deletions .sage/sagefile.go → .sage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"go.einride.tech/sage/tools/sggo"
"go.einride.tech/sage/tools/sggolangcilint"
"go.einride.tech/sage/tools/sggoreview"
"go.einride.tech/sage/tools/sggovulncheck"
"go.einride.tech/sage/tools/sgmarkdownfmt"
"go.einride.tech/sage/tools/sgyamlfmt"
)
Expand All @@ -23,14 +24,16 @@ func main() {
}

func All(ctx context.Context) error {
sg.Deps(ctx, ConvcoCheck, GolangciLint, GoReview, GoTest, FormatMarkdown, FormatYAML)
sg.SerialDeps(ctx, GoModTidy, GitVerifyNoDiff)
sg.Deps(ctx, ConvcoCheck, FormatMarkdown, FormatYAML)
sg.Deps(ctx, GoLint, GoReview, GoTest, GoVulnCheck)
sg.Deps(ctx, GoModTidy)
sg.Deps(ctx, GitVerifyNoDiff)
return nil
}

func FormatYAML(ctx context.Context) error {
sg.Logger(ctx).Println("formatting YAML files...")
return sgyamlfmt.Command(ctx, "-d", sg.FromGitRoot(), "-r").Run()
return sgyamlfmt.Run(ctx)
}

func GoModTidy(ctx context.Context) error {
Expand All @@ -45,14 +48,19 @@ func GoTest(ctx context.Context) error {

func GoReview(ctx context.Context) error {
sg.Logger(ctx).Println("reviewing Go files...")
return sggoreview.Command(ctx, "-c", "1", "./...").Run()
return sggoreview.Run(ctx)
}

func GolangciLint(ctx context.Context) error {
func GoLint(ctx context.Context) error {
sg.Logger(ctx).Println("linting Go files...")
return sggolangcilint.Run(ctx)
}

func GoVulnCheck(ctx context.Context) error {
sg.Logger(ctx).Println("checking Go files for vulnerabilities...")
return sggovulncheck.RunAll(ctx)
}

func FormatMarkdown(ctx context.Context) error {
sg.Logger(ctx).Println("formatting Markdown files...")
return sgmarkdownfmt.Command(ctx, "-w", ".").Run()
Expand Down
46 changes: 36 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,43 @@
# Code generated by go.einride.tech/sage. DO NOT EDIT.
# To learn more, see .sage/sagefile.go and https://github.com/einride/sage.
# To learn more, see .sage/main.go and https://github.com/einride/sage.

.DEFAULT_GOAL := all

sagefile := .sage/bin/sagefile
cwd := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
sagefile := $(abspath $(cwd)/.sage/bin/sagefile)

$(sagefile): .sage/go.mod .sage/*.go
@cd .sage && go mod tidy && go run .
# Setup Go.
go := $(shell command -v go 2>/dev/null)
export GOWORK ?= off
ifndef go
SAGE_GO_VERSION ?= 1.20.2
export GOROOT := $(abspath $(cwd)/.sage/tools/go/$(SAGE_GO_VERSION)/go)
export PATH := $(PATH):$(GOROOT)/bin
go := $(GOROOT)/bin/go
os := $(shell uname | tr '[:upper:]' '[:lower:]')
arch := $(shell uname -m)
ifeq ($(arch),x86_64)
arch := amd64
endif
$(go):
$(info installing Go $(SAGE_GO_VERSION)...)
@mkdir -p $(dir $(GOROOT))
@curl -sSL https://go.dev/dl/go$(SAGE_GO_VERSION).$(os)-$(arch).tar.gz | tar xz -C $(dir $(GOROOT))
@touch $(GOROOT)/go.mod
@chmod +x $(go)
endif

.PHONY: $(sagefile)
$(sagefile): $(go)
@cd .sage && $(go) mod tidy && $(go) run .

.PHONY: sage
sage:
@git clean -fxq $(sagefile)
@$(MAKE) $(sagefile)

.PHONY: update-sage
update-sage:
@cd .sage && go get -d go.einride.tech/sage@latest && go mod tidy && go run .
update-sage: $(go)
@cd .sage && $(go) get -d go.einride.tech/sage@latest && $(go) mod tidy && $(go) run .

.PHONY: clean-sage
clean-sage:
Expand All @@ -41,6 +63,10 @@ format-yaml: $(sagefile)
git-verify-no-diff: $(sagefile)
@$(sagefile) GitVerifyNoDiff

.PHONY: go-lint
go-lint: $(sagefile)
@$(sagefile) GoLint

.PHONY: go-mod-tidy
go-mod-tidy: $(sagefile)
@$(sagefile) GoModTidy
Expand All @@ -53,6 +79,6 @@ go-review: $(sagefile)
go-test: $(sagefile)
@$(sagefile) GoTest

.PHONY: golangci-lint
golangci-lint: $(sagefile)
@$(sagefile) GolangciLint
.PHONY: go-vuln-check
go-vuln-check: $(sagefile)
@$(sagefile) GoVulnCheck
17 changes: 14 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
module go.einride.tech/google-cloud-proto-scrubber

go 1.15
go 1.20

require (
google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de
google.golang.org/protobuf v1.28.1
cloud.google.com/go/longrunning v0.5.1
google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130
google.golang.org/protobuf v1.31.0
)

require (
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20230725213213-b022f6e96895 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/grpc v1.56.2 // indirect
)
Loading

0 comments on commit b45570a

Please sign in to comment.