Skip to content

Commit

Permalink
Remove up bin
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Saratura committed May 28, 2024
1 parent ac7e7a5 commit 31ca7ab
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions package/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,13 @@ mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
package_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))

crossplane_bin = $(go_bin)/kubectl-crossplane
up_bin = $(go_bin)/up

# Build kubectl-crossplane plugin
$(crossplane_bin):export GOBIN = $(go_bin)
$(crossplane_bin): | $(go_bin)
go install github.com/crossplane/crossplane/cmd/crank@latest
@mv $(go_bin)/crank $@

# Install up plugin
$(up_bin):export GOBIN = $(go_bin)
$(up_bin):export VERSION=v0.30.0
$(up_bin): | $(go_bin)
curl -sL "https://cli.upbound.io" | sh
@mv up $@
$(up_bin) version

.PHONY: package
package: ## All-in-one packaging and releasing
package: package-push
Expand All @@ -33,10 +24,10 @@ package-provider-local: $(crossplane_bin) generate-go ## Build Crossplane packag

.PHONY: package-provider
package-provider: export CONTROLLER_IMG = $(CONTAINER_IMG)
package-provider: $(up_bin) generate-go build-docker ## Build Crossplane package for Upbound Marketplace
package-provider: $(crossplane_bin) generate-go build-docker ## Build Crossplane package for Upbound Marketplace
@rm -rf package/*.xpkg
@yq e 'del(.spec)' $(package_dir)/crossplane.yaml.template > $(package_dir)/crossplane.yaml
$(up_bin) xpkg build -f $(package_dir) -o $(package_dir)/provider-exoscale.xpkg --controller=$(CONTROLLER_IMG)
$(crossplane_bin) xpkg build --package-root=$(package_dir) --embed-runtime-image=$(CONTROLLER_IMG) -o $(package_dir)/provider-exoscale.xpkg

.PHONY: .local-package-push
.local-package-push: pkg_file = $(shell ls $(package_dir)/*.xpkg)
Expand All @@ -51,11 +42,11 @@ package-provider: $(up_bin) generate-go build-docker ## Build Crossplane package
.PHONY: .upbound-package-push
.upbound-package-push: pkg_file = $(package_dir)/provider-exoscale.xpkg
.upbound-package-push: package-provider
$(up_bin) xpkg push -f $(pkg_file) $(UPBOUND_PACKAGE_IMG)
$(crossplane_bin) xpkg push -f $(pkg_file) $(UPBOUND_PACKAGE_IMG)

.PHONY: package-push
package-push: .ghcr-package-push .upbound-package-push ## Push Crossplane package to container registries

.PHONY: .package-clean
.package-clean:
rm -f $(crossplane_bin) $(up_bin) package/*.xpkg
rm -f $(crossplane_bin) package/*.xpkg

0 comments on commit 31ca7ab

Please sign in to comment.