Skip to content

Commit

Permalink
move main.go to be within the cmd directory structure and push all su…
Browse files Browse the repository at this point in the history
…bcommands down one layer

Signed-off-by: Jose R. Gonzalez <jose@flutes.dev>
  • Loading branch information
komish committed Oct 31, 2022
1 parent 6c20f8e commit 577ab6c
Show file tree
Hide file tree
Showing 23 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ vuln.html
*.dylib
bin
preflight
!cmd/preflight
openshift-preflight
preflight-*

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARCHITECTURES=amd64 arm64 ppc64le s390x

.PHONY: build
build:
go build -o $(BINARY) -ldflags "-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.commit=$(VERSION) -X github.com/redhat-openshift-ecosystem/openshift-preflight/version.version=$(RELEASE_TAG)" main.go
go build -o $(BINARY) -ldflags "-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.commit=$(VERSION) -X github.com/redhat-openshift-ecosystem/openshift-preflight/version.version=$(RELEASE_TAG)" cmd/preflight/main.go
@ls | grep -e '^preflight$$' &> /dev/null

.PHONY: build-multi-arch
Expand All @@ -21,7 +21,7 @@ define ARCHITECTURE_template
.PHONY: build-linux-$(1)
build-linux-$(1):
GOOS=linux GOARCH=$(1) go build -o $(BINARY)-linux-$(1) -ldflags "-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.commit=$(VERSION) \
-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.version=$(RELEASE_TAG)" main.go
-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.version=$(RELEASE_TAG)" cmd/preflight/main.go
endef

$(foreach arch,$(ARCHITECTURES),$(eval $(call ARCHITECTURE_template,$(arch))))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion main.go → cmd/preflight/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"log"

"github.com/redhat-openshift-ecosystem/openshift-preflight/cmd"
"github.com/redhat-openshift-ecosystem/openshift-preflight/cmd/preflight/cmd"
)

func main() {
Expand Down

0 comments on commit 577ab6c

Please sign in to comment.