Files
podman/test/tools/Makefile
Paul Holzinger 5e9725983d install swagger from source
First of all this removes the need for a network connection, second
renovate can update the version as it is tracked in go.mod.

However the real important part is that the binary downloads are
broken[1]. For some reason the swagger created with them does not
include all the type information for the examples. However when building
from source the same thing works fine.

[1] https://github.com/go-swagger/go-swagger/issues/2842

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-12 15:26:34 +02:00

42 lines
877 B
Makefile

GO := go
GO_BUILD=$(GO) build
BUILDDIR := build
SOURCES := $(shell find . -name '*.go')
all: $(BUILDDIR)
.PHONY: vendor
vendor:
$(GO) mod tidy
$(GO) mod vendor
$(GO) mod verify
.PHONY: clean
clean:
rm -rf $(BUILDDIR)
.PHONY: $(BUILDDIR)
$(BUILDDIR): \
$(BUILDDIR)/goimports \
$(BUILDDIR)/go-md2man \
$(BUILDDIR)/git-validation \
$(BUILDDIR)/ginkgo \
$(BUILDDIR)/swagger
$(BUILDDIR)/goimports: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/golang.org/x/tools/cmd/goimports
$(BUILDDIR)/go-md2man: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/github.com/cpuguy83/go-md2man/v2
$(BUILDDIR)/git-validation: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/github.com/vbatts/git-validation
$(BUILDDIR)/ginkgo: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/github.com/onsi/ginkgo/v2/ginkgo
$(BUILDDIR)/swagger: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/github.com/go-swagger/go-swagger/cmd/swagger