Skip to content

Commit

Permalink
chore: update deps and ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
odsod committed Jul 27, 2023
1 parent d6f1268 commit 4e42f65
Show file tree
Hide file tree
Showing 40 changed files with 117 additions and 1,183 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @ericwenn @odsod
* @einride/team-data-platform
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: daily
interval: monthly

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

- package-ecosystem: gomod
directory: .sage
schedule:
interval: weekly
interval: monthly
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ jobs:
- name: Setup Sage
uses: einride/sage/actions/setup@master
with:
go-version: 1.19
go-version: "1.20"

- name: Make
run: make

- name: Release
uses: go-semantic-release/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-initial-development-versions: true
- name: Run semantic-release
run: make semantic-release repo=${{ github.repository }} dry=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Sage
uses: einride/sage/actions/setup@master
with:
go-version: 1.19
go-version: "1.20"

- name: Make
run: make
2 changes: 1 addition & 1 deletion .sage/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module sage

go 1.17

require go.einride.tech/sage v0.201.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.201.0 h1:+F3RHppQme4p976sO6FU7XcxFpgTIGXthKA2+qHAv0E=
go.einride.tech/sage v0.201.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=
22 changes: 19 additions & 3 deletions .sage/sagefile.go → .sage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,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/sggosemanticrelease"
"go.einride.tech/sage/tools/sgmarkdownfmt"
"go.einride.tech/sage/tools/sgyamlfmt"
)
Expand All @@ -20,12 +21,12 @@ func main() {
sg.GenerateMakefiles(
sg.Makefile{
Path: sg.FromGitRoot("Makefile"),
DefaultTarget: All,
DefaultTarget: Default,
},
)
}

func All(ctx context.Context) error {
func Default(ctx context.Context) error {
sg.Deps(ctx, ConvcoCheck, GoLint, GoReview, GoTest, FormatMarkdown, FormatYAML)
sg.Deps(ctx, BufLint, BufGenerate)
sg.SerialDeps(ctx, GoModTidy, GitVerifyNoDiff)
Expand All @@ -49,7 +50,7 @@ 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 GoLint(ctx context.Context) error {
Expand Down Expand Up @@ -94,3 +95,18 @@ func ProtocGenGo(ctx context.Context) error {
_, err := sgtool.GoInstallWithModfile(ctx, "google.golang.org/protobuf/cmd/protoc-gen-go", sg.FromGitRoot("go.mod"))
return err
}

func SemanticRelease(ctx context.Context, repo string, dry bool) error {
sg.Logger(ctx).Println("triggering release...")
args := []string{
"--allow-initial-development-versions",
"--allow-no-changes",
"--ci-condition=default",
"--provider=github",
"--provider-opt=slug=" + repo,
}
if dry {
args = append(args, "--dry")
}
return sggosemanticrelease.Command(ctx, args...).Run()
}
22 changes: 16 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Code generated by go.einride.tech/sage. DO NOT EDIT.
# To learn more, see .sage/main.go and https://github.com/einride/sage.

.DEFAULT_GOAL := all
.DEFAULT_GOAL := default

cwd := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
sagefile := $(abspath $(cwd)/.sage/bin/sagefile)
Expand All @@ -10,7 +10,7 @@ sagefile := $(abspath $(cwd)/.sage/bin/sagefile)
go := $(shell command -v go 2>/dev/null)
export GOWORK ?= off
ifndef go
SAGE_GO_VERSION ?= 1.18.4
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
Expand Down Expand Up @@ -43,10 +43,6 @@ update-sage: $(go)
clean-sage:
@git clean -fdx .sage/tools .sage/bin .sage/build

.PHONY: all
all: $(sagefile)
@$(sagefile) All

.PHONY: buf-generate
buf-generate: $(sagefile)
@$(sagefile) BufGenerate
Expand All @@ -59,6 +55,10 @@ buf-lint: $(sagefile)
convco-check: $(sagefile)
@$(sagefile) ConvcoCheck

.PHONY: default
default: $(sagefile)
@$(sagefile) Default

.PHONY: format-markdown
format-markdown: $(sagefile)
@$(sagefile) FormatMarkdown
Expand Down Expand Up @@ -90,3 +90,13 @@ go-test: $(sagefile)
.PHONY: protoc-gen-go
protoc-gen-go: $(sagefile)
@$(sagefile) ProtocGenGo

.PHONY: semantic-release
semantic-release: $(sagefile)
ifndef repo
$(error missing argument repo="...")
endif
ifndef dry
$(error missing argument dry="...")
endif
@$(sagefile) SemanticRelease "$(repo)" "$(dry)"
19 changes: 15 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
module go.einride.tech/protobuf-avro

go 1.16
go 1.20

require (
cloud.google.com/go v0.110.0
cloud.google.com/go v0.110.6
github.com/google/go-cmp v0.5.9
github.com/linkedin/goavro/v2 v2.12.0
google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc
google.golang.org/protobuf v1.28.1
google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e
google.golang.org/protobuf v1.31.0
gotest.tools/v3 v3.5.0
)

require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // 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/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 // 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 4e42f65

Please sign in to comment.