Skip to content

Commit

Permalink
Merge pull request #8956 from rhatdan/Makefile
Browse files Browse the repository at this point in the history
Makefile: add target to generate bindings
  • Loading branch information
openshift-merge-robot authored Jan 14, 2021
2 parents a1b4974 + d498ef5 commit 2b7793b
Show file tree
Hide file tree
Showing 89 changed files with 200 additions and 181 deletions.
29 changes: 26 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ endif
podman: bin/podman

.PHONY: bin/podman-remote
bin/podman-remote: .gopathok $(SOURCES) go.mod go.sum ## Build with podman on remote environment
bin/podman-remote: .gopathok .generate-bindings $(SOURCES) go.mod go.sum ## Build with podman on remote environment
$(GO) build $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o $@ ./cmd/podman

.PHONY: bin/podman-remote-static
Expand Down Expand Up @@ -268,6 +268,8 @@ clean: ## Clean artifacts
libpod/pod_ffjson.go \
libpod/container_easyjson.go \
libpod/pod_easyjson.go \
.install.goimports \
.generate-bindings \
docs/build
make -C docs clean

Expand Down Expand Up @@ -407,7 +409,7 @@ release.txt:
# X-RELEASE-INFO format depended upon by automated tooling
echo -n "X-RELEASE-INFO:" > "$@"
for field in "$(RELEASE_BASENAME)" "$(RELEASE_VERSION)" \
"$(RELEASE_DIST)" "$(RELEASE_DIST_VER)" "$(RELEASE_ARCH)"; do \
"$(RELEASE_DIST)" "$(RELEASE_DIST_VER)" "$(RELEASE_ARCH)"; do \
echo -n " $$field"; done >> "$@"
echo "" >> "$@"

Expand Down Expand Up @@ -449,6 +451,21 @@ podman-remote-%-release:
rm -f release.txt
$(MAKE) podman-remote-release-$*.zip

BINDINGS_SOURCE = $(wildcard pkg/bindings/**/types.go)
.generate-bindings: $(BINDINGS_SOURCE)
ifneq ($(shell uname -s), Darwin)
for i in $(BINDINGS_SOURCE); do \
dirname=$$(dirname $${i}); \
shortname=$$(basename $${dirname}); \
pushd $${dirname}>/dev/null; \
echo $${dirname}; \
echo $(GO) generate; \
$(GO) generate; \
popd > /dev/null; \
done;
endif
touch .generate-bindings

.PHONY: docker-docs
docker-docs: docs
(cd docs; ./dckrman.sh ./build/man/*.1)
Expand Down Expand Up @@ -565,13 +582,19 @@ uninstall:
GIT_CHECK_EXCLUDE="./vendor:docs/make.bat" $(GOBIN)/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)

.PHONY: install.tools
install.tools: .install.gitvalidation .install.md2man .install.ginkgo .install.golangci-lint .install.bats ## Install needed tools
install.tools: .install.goimports .install.gitvalidation .install.md2man .install.ginkgo .install.golangci-lint .install.bats ## Install needed tools

define go-get
env GO111MODULE=off \
$(GO) get -u ${1}
endef

.install.goimports: .gopathok
if [ ! -x "$(GOBIN)/goimports" ]; then \
$(call go-get,golang.org/x/tools/cmd/goimports); \
fi
touch .install.goimports

.PHONY: .install.ginkgo
.install.ginkgo: .gopathok
if [ ! -x "$(GOBIN)/ginkgo" ]; then \
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ require (
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3
google.golang.org/appengine v1.6.6 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_attach_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:18.566804404 -0600 CST m=+0.000258831
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *AttachOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_checkpoint_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:18.714853285 -0600 CST m=+0.000319103
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *CheckpointOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_commit_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:18.420656951 -0600 CST m=+0.000259662
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *CommitOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_create_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:19.011789618 -0600 CST m=+0.000259413
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_diff_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:19.159128927 -0600 CST m=+0.000255635
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_execinspect_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:19.303239014 -0600 CST m=+0.000256861
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *ExecInspectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_execstart_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:19.447714428 -0600 CST m=+0.000257278
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *ExecStartOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_execstartandattach_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:22.827903078 -0600 CST m=+0.000269906
*/

// Changed
Expand All @@ -41,6 +40,7 @@ func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_export_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:22.101679998 -0600 CST m=+0.000261669
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_healthcheck_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:19.593883686 -0600 CST m=+0.000289845
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *HealthCheckOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_init_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:22.245077233 -0600 CST m=+0.000255461
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *InitOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
4 changes: 2 additions & 2 deletions pkg/bindings/containers/types_inspect_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"net/url"
"reflect"
"strconv"
"strings"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
)

/*
This file is generated automatically by go generate. Do not edit.
Created 2020-12-18 13:33:20.635987603 -0600 CST m=+0.000260270
*/

// Changed
Expand All @@ -39,6 +38,7 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
Expand Down
Loading

0 comments on commit 2b7793b

Please sign in to comment.