Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use ory-dev instead of swagutil #465

Merged
merged 2 commits into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2.1

orbs:
sdk: ory/[email protected].33
sdk: ory/[email protected].35
changelog: ory/[email protected]
goreleaser: ory/[email protected]
slack: circleci/[email protected]
nancy: ory/[email protected].9
nancy: ory/[email protected].10
docs: ory/[email protected]
golangci: ory/[email protected]

Expand Down
44 changes: 30 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
SHELL=/bin/bash -o pipefail

.PHONY: tools
tools:
GO111MODULE=on go install github.com/ory/go-acc github.com/ory/x/tools/listx github.com/go-swagger/go-swagger/cmd/swagger github.com/sqs/goreturns github.com/ory/sdk/swagutil
export GO111MODULE := on
export PATH := .bin:${PATH}

.PHONY: deps
deps:
ifneq ("$(shell base64 Makefile))","$(shell cat .bin/.lock)")
go build -o .bin/go-acc github.com/ory/go-acc
go build -o .bin/goreturns github.com/sqs/goreturns
go build -o .bin/listx github.com/ory/x/tools/listx
go build -o .bin/mockgen github.com/golang/mock/mockgen
go build -o .bin/swagger github.com/go-swagger/go-swagger/cmd/swagger
go build -o .bin/goimports golang.org/x/tools/cmd/goimports
go build -o .bin/ory-dev github.com/ory/meta/tools/ory-dev
go build -o .bin/packr2 github.com/gobuffalo/packr/v2/packr2
go build -o .bin/go-bindata github.com/go-bindata/go-bindata/go-bindata
echo "v0" > .bin/.lock
echo "$$(base64 Makefile)" > .bin/.lock
endif

# Formats the code
.PHONY: format
format:
format: deps
goreturns -w -local github.com/ory $$(listx .)

.PHONY: gen
gen: mocks sdk
gen:
mocks sdk

# Generates the SDKs
.PHONY: sdk
sdk:
$$(go env GOPATH)/bin/swagger generate spec -m -o ./.schema/api.swagger.json -x internal/httpclient
$$(go env GOPATH)/bin/swagutil sanitize ./.schema/api.swagger.json
$$(go env GOPATH)/bin/swagger flatten --with-flatten=remove-unused -o ./.schema/api.swagger.json ./.schema/api.swagger.json
$$(go env GOPATH)/bin/swagger validate ./.schema/api.swagger.json
sdk: deps
swagger generate spec -m -o ./.schema/api.swagger.json -x internal/httpclient
ory-dev swagger sanitize ./.schema/api.swagger.json
swagger flatten --with-flatten=remove-unused -o ./.schema/api.swagger.json ./.schema/api.swagger.json
swagger validate ./.schema/api.swagger.json
rm -rf internal/httpclient
mkdir -p internal/httpclient
$$(go env GOPATH)/bin/swagger generate client -f ./.schema/api.swagger.json -t internal/httpclient -A Ory_Oathkeeper
swagger generate client -f ./.schema/api.swagger.json -t internal/httpclient -A Ory_Oathkeeper
make format

.PHONY: install-stable
install-stable:
install-stable: deps
OATHKEEPER_LATEST=$$(git describe --abbrev=0 --tags)
git checkout $$OATHKEEPER_LATEST
packr2
Expand All @@ -36,13 +52,13 @@ install-stable:
git checkout master

.PHONY: install
install:
install: deps
packr2 || (GO111MODULE=on go install github.com/gobuffalo/packr/v2/packr2 && packr2)
GO111MODULE=on go install .
packr2 clean

.PHONY: docker
docker:
docker: deps
packr2 || (GO111MODULE=on go install github.com/gobuffalo/packr/v2/packr2 && packr2)
CGO_ENABLED=0 GO111MODULE=on GOOS=linux GOARCH=amd64 go build
packr2 clean
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ require (
github.com/gobwas/glob v0.2.3
github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2
github.com/golang/mock v1.3.1
github.com/golang/protobuf v1.3.3 // indirect
github.com/google/uuid v1.1.1
github.com/gorilla/mux v1.7.1 // indirect
github.com/gorilla/websocket v1.4.2
Expand All @@ -35,16 +34,16 @@ require (
github.com/mitchellh/copystructure v1.0.0
github.com/ory/analytics-go/v4 v4.0.1
github.com/ory/fosite v0.29.2
github.com/ory/go-acc v0.2.1
github.com/ory/go-acc v0.2.3
github.com/ory/go-convenience v0.1.0
github.com/ory/gojsonschema v1.2.0
github.com/ory/graceful v0.1.1
github.com/ory/herodot v0.8.4
github.com/ory/jsonschema/v3 v3.0.1
github.com/ory/ladon v1.1.0
github.com/ory/sdk/swagutil v0.0.0-20200525104141-b009efcf4f04
github.com/ory/meta/tools/ory-dev v0.0.0-20200608154018-9d325ca2087d
github.com/ory/viper v1.7.5
github.com/ory/x v0.0.126
github.com/ory/x v0.0.128
github.com/pborman/uuid v1.2.0
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
Expand All @@ -55,14 +54,15 @@ require (
github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518
github.com/square/go-jose v2.3.1+incompatible
github.com/stretchr/testify v1.5.1
github.com/tidwall/gjson v1.3.5
github.com/tidwall/sjson v1.0.4
github.com/tidwall/gjson v1.6.0
github.com/tidwall/sjson v1.1.1
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
github.com/urfave/negroni v1.0.0
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/tools v0.0.0-20200325203130-f53864d0dba1
google.golang.org/grpc v1.29.1 // indirect
gopkg.in/square/go-jose.v2 v2.3.1
)

Expand Down
Loading