Skip to content

Commit

Permalink
feat: bump to Go 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
odsod committed Jul 26, 2022
1 parent 33f55cc commit d606a6c
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 33 deletions.
8 changes: 4 additions & 4 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: weekly

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

- package-ecosystem: gomod
directory: .mage
directory: .sage
schedule:
interval: daily
interval: weekly
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
steps:
- name: Setup Sage
uses: einride/sage/actions/setup@master
with:
go-version: 1.18

- name: Make
run: make
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
steps:
- name: Setup Sage
uses: einride/sage/actions/setup@master
with:
go-version: 1.18

- name: Make
run: make
Expand Down
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.102.1
require go.einride.tech/sage v0.141.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.102.1 h1:tK7x77IGjMlZg+hworam1rvKkPZJaA2i/BXLk+S0qas=
go.einride.tech/sage v0.102.1/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
go.einride.tech/sage v0.141.0 h1:ZQ1KLpS1fiSzCDwWKV+IR1zJ9TXaPQxY39tnHu5pehM=
go.einride.tech/sage v0.141.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
3 changes: 2 additions & 1 deletion .sage/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
type Proto sg.Namespace

func (Proto) All(ctx context.Context) error {
sg.Deps(ctx, Proto.BufFormat, Proto.BufLint, Proto.BufGenerate)
sg.Deps(ctx, Proto.BufFormat, Proto.BufLint)
sg.Deps(ctx, Proto.BufGenerate)
sg.Deps(ctx, Proto.BufGenerateExample)
return nil
}
Expand Down
30 changes: 25 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,37 @@

sagefile := .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)
ifndef go
SAGE_GO_VERSION ?= 1.18.4
export GOROOT := .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 Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
module go.einride.tech/protoc-gen-go-cli

go 1.17
go 1.18

require (
github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
github.com/stoewer/go-strcase v1.2.0
go.einride.tech/aip v0.55.0
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b
google.golang.org/grpc v1.48.0
google.golang.org/protobuf v1.28.0
gotest.tools/v3 v3.3.0
)

require (
cloud.google.com/go v0.99.0 // indirect
cloud.google.com/go/compute v1.7.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/net v0.0.0-20220725212005-46097bf591d3 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
)
89 changes: 81 additions & 8 deletions go.sum

Large diffs are not rendered by default.

30 changes: 25 additions & 5 deletions proto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,37 @@

sagefile := ../.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)
ifndef go
SAGE_GO_VERSION ?= 1.18.4
export GOROOT := ../.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 Down

0 comments on commit d606a6c

Please sign in to comment.