Skip to content

Commit

Permalink
🧹 use new major version for go mod (#2098)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock authored Oct 5, 2023
1 parent 5956823 commit 78537dc
Show file tree
Hide file tree
Showing 939 changed files with 3,047 additions and 3,041 deletions.
2 changes: 1 addition & 1 deletion .github/.goreleaser-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ builds:
- -tags="production netgo"
ldflags:
- "-extldflags=-static"
- -s -w -X go.mondoo.com/cnquery.Version={{.Version}} -X go.mondoo.com/cnquery.Build={{.ShortCommit}} -X go.mondoo.com/cnquery.Date={{.Date}}
- -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}}
checksum:
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS'
algorithm: sha256
Expand Down
6 changes: 3 additions & 3 deletions .github/.goreleaser-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ builds:
- -tags="production netgo"
ldflags:
- "-extldflags=-static"
- -s -w -X go.mondoo.com/cnquery.Version={{.Version}} -X go.mondoo.com/cnquery.Build={{.ShortCommit}} -X go.mondoo.com/cnquery.Date={{.Date}}
- -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}}
- id: macos
main: ./apps/cnquery/cnquery.go
binary: cnquery
Expand All @@ -41,7 +41,7 @@ builds:
flags: -tags production
ldflags:
# clang + macos does not support static: - -extldflags "-static"
- -s -w -X go.mondoo.com/cnquery.Version={{.Version}} -X go.mondoo.com/cnquery.Build={{.ShortCommit}} -X go.mondoo.com/cnquery.Date={{.Date}}
- -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}}
hooks:
post:
- cmd: /tmp/quill sign-and-notarize "{{ .Path }}" -vv || true
Expand All @@ -59,7 +59,7 @@ builds:
flags: -tags production -buildmode exe
ldflags:
- "-extldflags -static"
- -s -w -X go.mondoo.com/cnquery.Version={{.Version}} -X go.mondoo.com/cnquery.Build={{.ShortCommit}} -X go.mondoo.com/cnquery.Date={{.Date}}
- -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}}
hooks:
post:
- cmd: ./scripts/windows-upx.sh "{{ .Path }}"
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ builds:
- -tags="production netgo"
ldflags:
- "-extldflags=-static"
- -s -w -X go.mondoo.com/cnquery.Version={{.Version}} -X go.mondoo.com/cnquery.Build={{.ShortCommit}} -X go.mondoo.com/cnquery.Date={{.Date}}
- -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}}
- id: macos
main: ./apps/cnquery/cnquery.go
binary: cnquery
Expand All @@ -41,7 +41,7 @@ builds:
flags: -tags production
ldflags:
# clang + macos does not support static: - -extldflags "-static"
- -s -w -X go.mondoo.com/cnquery.Version={{.Version}} -X go.mondoo.com/cnquery.Build={{.ShortCommit}} -X go.mondoo.com/cnquery.Date={{.Date}}
- -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}}
hooks:
post:
- cmd: /tmp/quill sign-and-notarize "{{ .Path }}" -vv || true
Expand All @@ -59,7 +59,7 @@ builds:
flags: -tags production -buildmode exe
ldflags:
- "-extldflags -static"
- -s -w -X go.mondoo.com/cnquery.Version={{.Version}} -X go.mondoo.com/cnquery.Build={{.ShortCommit}} -X go.mondoo.com/cnquery.Date={{.Date}}
- -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}}
hooks:
post:
- cmd: ./scripts/windows-upx.sh "{{ .Path }}"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ ifeq ($(TARGETOS),windows)
BIN_SUFFIX=".exe"
endif

LDFLAGS=-ldflags "-s -w -X go.mondoo.com/cnquery.Version=${VERSION} -X go.mondoo.com/cnquery.Build=${TAG}" # -linkmode external -extldflags=-static
LDFLAGSDIST=-tags production -ldflags "-s -w -X go.mondoo.com/cnquery.Version=${LATEST_VERSION_TAG} -X go.mondoo.com/cnquery.Build=${TAG} -s -w"
LDFLAGS=-ldflags "-s -w -X go.mondoo.com/cnquery/v9.Version=${VERSION} -X go.mondoo.com/cnquery/v9.Build=${TAG}" # -linkmode external -extldflags=-static
LDFLAGSDIST=-tags production -ldflags "-s -w -X go.mondoo.com/cnquery/v9.Version=${LATEST_VERSION_TAG} -X go.mondoo.com/cnquery/v9.Build=${TAG} -s -w"

.PHONY: info/ldflags
info/ldflags:
Expand Down
4 changes: 2 additions & 2 deletions _motor/discovery/common/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package common

import (
"github.com/rs/zerolog/log"
inventory "go.mondoo.com/cnquery/motor/inventory/v1"
"go.mondoo.com/cnquery/motor/vault"
inventory "go.mondoo.com/cnquery/v9/motor/inventory/v1"
"go.mondoo.com/cnquery/v9/motor/vault"
)

type (
Expand Down
10 changes: 5 additions & 5 deletions _motor/discovery/gcp/instancesnapshot/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"context"
"errors"

"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/discovery/common"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/gcpinstancesnapshot"
"go.mondoo.com/cnquery/motor/vault"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/discovery/common"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/gcpinstancesnapshot"
"go.mondoo.com/cnquery/v9/motor/vault"
)

type Resolver struct{}
Expand Down
14 changes: 7 additions & 7 deletions _motor/discovery/gcp/resolver_folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"fmt"

"github.com/cockroachdb/errors"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/discovery/common"
"go.mondoo.com/cnquery/motor/platform/detector"
"go.mondoo.com/cnquery/motor/providers"
gcp_provider "go.mondoo.com/cnquery/motor/providers/google"
"go.mondoo.com/cnquery/motor/providers/resolver"
"go.mondoo.com/cnquery/motor/vault"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/discovery/common"
"go.mondoo.com/cnquery/v9/motor/platform/detector"
"go.mondoo.com/cnquery/v9/motor/providers"
gcp_provider "go.mondoo.com/cnquery/v9/motor/providers/google"
"go.mondoo.com/cnquery/v9/motor/providers/resolver"
"go.mondoo.com/cnquery/v9/motor/vault"
)

var FolderDiscoveryTargets = append(ProjectDiscoveryTargets)
Expand Down
12 changes: 6 additions & 6 deletions _motor/discovery/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (

"github.com/google/go-github/v49/github"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/discovery/common"
"go.mondoo.com/cnquery/motor/providers"
github_provider "go.mondoo.com/cnquery/motor/providers/github"
"go.mondoo.com/cnquery/motor/providers/resolver"
"go.mondoo.com/cnquery/motor/vault"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/discovery/common"
"go.mondoo.com/cnquery/v9/motor/providers"
github_provider "go.mondoo.com/cnquery/v9/motor/providers/github"
"go.mondoo.com/cnquery/v9/motor/providers/resolver"
"go.mondoo.com/cnquery/v9/motor/vault"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions _motor/discovery/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"context"
"errors"

"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/discovery/common"
"go.mondoo.com/cnquery/motor/providers"
gitlab_transport "go.mondoo.com/cnquery/motor/providers/gitlab"
"go.mondoo.com/cnquery/motor/providers/resolver"
"go.mondoo.com/cnquery/motor/vault"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/discovery/common"
"go.mondoo.com/cnquery/v9/motor/providers"
gitlab_transport "go.mondoo.com/cnquery/v9/motor/providers/gitlab"
"go.mondoo.com/cnquery/v9/motor/providers/resolver"
"go.mondoo.com/cnquery/v9/motor/vault"
)

const DiscoveryGroup = "group"
Expand Down
8 changes: 4 additions & 4 deletions _motor/discovery/k8s/asset_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"strings"

"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/platform"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/platform"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
"google.golang.org/protobuf/proto"
"k8s.io/apimachinery/pkg/api/meta"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion _motor/discovery/k8s/asset_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers"

batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
10 changes: 5 additions & 5 deletions _motor/discovery/k8s/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"strings"

"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/discovery/common"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/discovery/common"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
)

type K8sResourceIdentifier struct {
Expand Down
2 changes: 1 addition & 1 deletion _motor/discovery/k8s/container_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package k8s
import (
"strings"

"go.mondoo.com/cnquery/types"
"go.mondoo.com/cnquery/v9/types"
v1 "k8s.io/api/core/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion _motor/discovery/k8s/creds_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
v1 "k8s.io/api/core/v1"
)

Expand Down
8 changes: 4 additions & 4 deletions _motor/discovery/k8s/list_admission_reviews.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/motor/providers/k8s/resources"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/providers/k8s/resources"
admissionv1 "k8s.io/api/admission/v1"
"k8s.io/apimachinery/pkg/api/meta"
)
Expand Down
4 changes: 2 additions & 2 deletions _motor/discovery/k8s/list_admission_reviews_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"

admissionv1 "k8s.io/api/admission/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
10 changes: 5 additions & 5 deletions _motor/discovery/k8s/list_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
"github.com/docker/cli/cli/config/configfile"
"github.com/google/go-containerregistry/pkg/name"

"go.mondoo.com/cnquery/motor/discovery/container_registry"
"go.mondoo.com/cnquery/motor/vault"
"go.mondoo.com/cnquery/types"
"go.mondoo.com/cnquery/v9/motor/discovery/container_registry"
"go.mondoo.com/cnquery/v9/motor/vault"
"go.mondoo.com/cnquery/v9/types"

"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
v1 "k8s.io/api/core/v1"
)

Expand Down
4 changes: 2 additions & 2 deletions _motor/discovery/k8s/list_images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ package k8s
import (
"testing"

"go.mondoo.com/cnquery/motor/motorid/containerid"
"go.mondoo.com/cnquery/v9/motor/motorid/containerid"

"github.com/golang/mock/gomock"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
6 changes: 3 additions & 3 deletions _motor/discovery/k8s/list_ingresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
package k8s

import (
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
)

// ListIngresses lists all ingresses in the cluster.
Expand Down
6 changes: 3 additions & 3 deletions _motor/discovery/k8s/list_namespaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package k8s
import (
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
v1 "k8s.io/api/core/v1"
k8sErrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
Expand Down
10 changes: 5 additions & 5 deletions _motor/discovery/k8s/list_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"strings"

"github.com/pkg/errors"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/motorid/gce"
"go.mondoo.com/cnquery/motor/platform"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/motorid/gce"
"go.mondoo.com/cnquery/v9/motor/platform"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
v1 "k8s.io/api/core/v1"
)

Expand Down
4 changes: 2 additions & 2 deletions _motor/discovery/k8s/list_nodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down
6 changes: 3 additions & 3 deletions _motor/discovery/k8s/list_workloads.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/gobwas/glob"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
v1 "k8s.io/api/core/v1"
k8sErrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
Expand Down
4 changes: 2 additions & 2 deletions _motor/discovery/k8s/list_workloads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
10 changes: 5 additions & 5 deletions _motor/discovery/k8s/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ package k8s
import (
"context"

"go.mondoo.com/cnquery/motor/asset"
"go.mondoo.com/cnquery/motor/discovery/common"
"go.mondoo.com/cnquery/motor/providers"
"go.mondoo.com/cnquery/motor/providers/k8s/resources"
"go.mondoo.com/cnquery/motor/vault"
"go.mondoo.com/cnquery/v9/motor/asset"
"go.mondoo.com/cnquery/v9/motor/discovery/common"
"go.mondoo.com/cnquery/v9/motor/providers"
"go.mondoo.com/cnquery/v9/motor/providers/k8s/resources"
"go.mondoo.com/cnquery/v9/motor/vault"
)

var _ common.ContextInitializer = (*NamespaceResolver)(nil)
Expand Down
Loading

0 comments on commit 78537dc

Please sign in to comment.