Skip to content

Commit

Permalink
makefile: make generate to work fine with go mod
Browse files Browse the repository at this point in the history
  • Loading branch information
karol-kokoszka committed Oct 6, 2022
1 parent efcd1c0 commit 87cc888
Show file tree
Hide file tree
Showing 49 changed files with 9,210 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ require (
github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5
github.com/stoewer/go-strcase v1.2.0
go.uber.org/atomic v1.7.0
go.uber.org/config v1.4.0
go.uber.org/goleak v1.1.11
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc=
github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU=
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
Expand All @@ -740,6 +742,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
Expand Down
2 changes: 2 additions & 0 deletions pkg/rclone/rcserver/internalgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Copyright (C) 2017 ScyllaDB
#

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "${SCRIPT_DIR}" || exit 1
rm -f internal/rclone_supported_calls.go
jq '.paths | [keys[] | select(. | startswith("/rclone")) | sub("^/rclone/"; "")]' $(git rev-parse --show-toplevel)/swagger/agent.json | \
go run internal/templates/jsontemplate.go internal/templates/rclone_supported_calls.gotmpl > \
Expand Down
2 changes: 1 addition & 1 deletion pkg/schema/table/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package table

//go:generate schemagen -keyspace scylla_manager -output . -pkgname table
//go:generate go run github.com/scylladb/gocqlx/v2/cmd/schemagen -keyspace scylla_manager -output . -pkgname table
3 changes: 2 additions & 1 deletion pkg/scyllaclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/hailocab/go-hostpool"
"github.com/pkg/errors"
"github.com/scylladb/go-log"

"github.com/scylladb/scylla-manager/v3/pkg/auth"
"github.com/scylladb/scylla-manager/v3/pkg/util/httpx"
agentClient "github.com/scylladb/scylla-manager/v3/swagger/gen/agent/client"
Expand All @@ -37,7 +38,7 @@ func setOpenAPIGlobals() {
})
}

//go:generate ./internalgen.sh
//go:generate ../rclone/rcserver/internalgen.sh

// DefaultTransport returns a new http.Transport with similar default values to
// http.DefaultTransport. Do not use this for transient transports as it can
Expand Down
10 changes: 10 additions & 0 deletions tools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//go:build tools
// +build tools

package main

import (
_ "github.com/golang/mock/mockgen"
_ "github.com/scylladb/gocqlx/v2/cmd/schemagen"
_ "github.com/stoewer/go-strcase"
)
Loading

0 comments on commit 87cc888

Please sign in to comment.