Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Jul 8, 2021
1 parent 9376e2e commit 7a25f2a
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 49 deletions.
6 changes: 0 additions & 6 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ $(MUTAGEN): $(BINGO_DIR)/mutagen.mod
@echo "(re)installing $(GOBIN)/mutagen-v0.11.8"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=mutagen.mod -o=$(GOBIN)/mutagen-v0.11.8 "github.com/mutagen-io/mutagen/cmd/mutagen"

OAPI_CODEGEN := $(GOBIN)/oapi-codegen-v1.6.1
$(OAPI_CODEGEN): $(BINGO_DIR)/oapi-codegen.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/oapi-codegen-v1.6.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=oapi-codegen.mod -o=$(GOBIN)/oapi-codegen-v1.6.1 "github.com/deepmap/oapi-codegen/cmd/oapi-codegen"

PROTOC_GEN_DOC := $(GOBIN)/protoc-gen-doc-v1.4.1
$(PROTOC_GEN_DOC): $(BINGO_DIR)/protoc-gen-doc.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
Expand Down
2 changes: 0 additions & 2 deletions .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ HUGO="${GOBIN}/hugo-v0.80.0"

MUTAGEN="${GOBIN}/mutagen-v0.11.8"

OAPI_CODEGEN="${GOBIN}/oapi-codegen-v1.6.1"

PROTOC_GEN_DOC="${GOBIN}/protoc-gen-doc-v1.4.1"

PROTOC_GEN_GO="${GOBIN}/protoc-gen-go-v1.26.0"
Expand Down
15 changes: 0 additions & 15 deletions .make/openapi.mk

This file was deleted.

25 changes: 1 addition & 24 deletions graph/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,4 @@ ci-go-generate: # CI runs ci-node-generate automatically before this target
@go generate $(GENERATE)

.PHONY: ci-node-generate
ci-node-generate:

############ openapi ############
OPENAPI_VERSION := v0
OPENAPI_SRC := pkg/openapi/$(OPENAPI_VERSION)
OPENGRAPH_VERSION := v0.0

include ../.make/openapi.mk

$(OPENAPI_SRC):
@mkdir -p $(OPENAPI_SRC)

.PHONY: openapi
openapi: $(OPENAPI_SRC) \
$(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml \
$(OPENAPI_SRC)/${NAME}.types.go \
$(OPENAPI_SRC)/${NAME}.server.go


SPEC_URL = https://github.com/raw/owncloud/open-graph-api/fix-code-generation/api/openapi-spec/${OPENGRAPH_VERSION}.yml

#.PHONY: $(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml # force overwrite
$(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml:
curl -o $(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml ${SPEC_URL}
ci-node-generate:
3 changes: 1 addition & 2 deletions graph/pkg/service/v0/drives.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func cs3ResourceToDriveItem(res *storageprovider.ResourceInfo) (*msgraph.DriveIt
driveItem.BaseItem.LastModifiedDateTime = &lastModified
}
if res.Type == storageprovider.ResourceType_RESOURCE_TYPE_FILE {
driveItem.File = &msgraph.OpenGraphFile{
driveItem.File = &msgraph.OpenGraphFile{ // FIXME We cannot use msgraph.File here because the openapi codegenerator autodetects 'File' as a go type ...
MimeType: &res.MimeType,
}
}
Expand Down Expand Up @@ -231,7 +231,6 @@ func cs3StorageSpaceToDrive(baseURL *url.URL, space *storageprovider.StorageSpac
drive.BaseItem.LastModifiedDateTime = &lastModified
}
if space.Quota != nil {
// FIXME use https://github.com/owncloud/open-graph-api and return proper int64
var t int64
if space.Quota.QuotaMaxBytes > math.MaxInt64 {
t = math.MaxInt64
Expand Down

0 comments on commit 7a25f2a

Please sign in to comment.