Skip to content

Commit

Permalink
Merge pull request #115 from depot/connect
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie authored May 8, 2023
2 parents 415dbb5 + e9f0e9a commit ac71d5a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
check-latest: true
cache: true
- name: Verify dependencies
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
check-latest: true
cache: true
- uses: goreleaser/goreleaser-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
check-latest: true
cache: true
- name: Compute tag name
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
run:
go: "1.18"
go: "1.20"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.18 AS build
FROM --platform=$BUILDPLATFORM golang:1.20 AS build
WORKDIR /src
ARG LDFLAGS
ARG TARGETARCH
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/depot/cli

go 1.18
go 1.20

require (
github.com/adrg/xdg v0.4.0
github.com/briandowns/spinner v1.18.1
github.com/bufbuild/connect-go v1.1.0
github.com/bufbuild/connect-go v1.7.0
github.com/buildkite/agent/v3 v3.45.0
github.com/charmbracelet/bubbles v0.15.0
github.com/charmbracelet/bubbletea v0.23.1
Expand Down Expand Up @@ -39,7 +39,7 @@ require (
golang.org/x/exp v0.0.0-20220428152302-39d4317da171
golang.org/x/sync v0.1.0
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.28.1
google.golang.org/protobuf v1.30.0
gopkg.in/yaml.v2 v2.4.0
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
github.com/briandowns/spinner v1.18.1 h1:yhQmQtM1zsqFsouh09Bk/jCjd50pC3EOGsh28gLVvwY=
github.com/briandowns/spinner v1.18.1/go.mod h1:mQak9GHqbspjC/5iUx3qMlIho8xBS/ppAL/hX5SmPJU=
github.com/bufbuild/connect-go v1.1.0 h1:AUgqqO2ePdOJSpPOep6BPYz5v2moW1Lb8sQh0EeRzQ8=
github.com/bufbuild/connect-go v1.1.0/go.mod h1:9iNvh/NOsfhNBUH5CtvXeVUskQO1xsrEviH7ZArwZ3I=
github.com/bufbuild/connect-go v1.7.0 h1:MGp82v7SCza+3RhsVhV7aMikwxvI3ZfD72YiGt8FYJo=
github.com/bufbuild/connect-go v1.7.0/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk=
github.com/bugsnag/bugsnag-go v1.4.1 h1:TT3P9AX69w8mbSGE8L7IJOO2KBlPN0iQtYD0dUlrWHc=
github.com/bugsnag/panicwrap v1.2.0 h1:OzrKrRvXis8qEvOkfcxNcYbOd2O7xXS2nnKMEMABFQA=
github.com/buildkite/agent/v3 v3.45.0 h1:LEHtJSE0q2ZGsBb5yvhVr53+pRHCHLrENT4WR4nEy70=
Expand Down Expand Up @@ -1039,8 +1039,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ func NewBuildClient() cliv1connect.BuildServiceClient {
if baseURL == "" {
baseURL = "https://api.depot.dev"
}
return cliv1connect.NewBuildServiceClient(http.DefaultClient, baseURL, connect.WithGRPC(), WithUserAgent())
return cliv1connect.NewBuildServiceClient(http.DefaultClient, baseURL, WithUserAgent())
}

func NewLoginClient() cliv1beta1connect.LoginServiceClient {
baseURL := os.Getenv("DEPOT_API_URL")
if baseURL == "" {
baseURL = "https://api.depot.dev"
}
return cliv1beta1connect.NewLoginServiceClient(http.DefaultClient, baseURL, connect.WithGRPC(), WithUserAgent())
return cliv1beta1connect.NewLoginServiceClient(http.DefaultClient, baseURL, WithUserAgent())
}

func NewProjectsClient() cliv1beta1connect.ProjectsServiceClient {
baseURL := os.Getenv("DEPOT_API_URL")
if baseURL == "" {
baseURL = "https://api.depot.dev"
}
return cliv1beta1connect.NewProjectsServiceClient(http.DefaultClient, baseURL, connect.WithGRPC(), WithUserAgent())
return cliv1beta1connect.NewProjectsServiceClient(http.DefaultClient, baseURL, WithUserAgent())
}

func WithAuthentication[T any](req *connect.Request[T], token string) *connect.Request[T] {
Expand Down
5 changes: 0 additions & 5 deletions pkg/load/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ package load

import (
"math/rand"
"time"
)

func init() {
rand.Seed(time.Now().UnixNano())
}

// During a download of an image we temporarily store the image with this
// random name to avoid conflicts with any other images.
func RandImageName() string {
Expand Down

0 comments on commit ac71d5a

Please sign in to comment.