Skip to content

Commit

Permalink
chore(dev): rebuild release (#1237)
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh authored Sep 26, 2024
1 parent c73a9b9 commit 2ff6d0e
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,23 @@ output/bin/embedded-cluster-release-builder:
CGO_ENABLED=0 go build -o output/bin/embedded-cluster-release-builder e2e/embedded-cluster-release-builder/main.go

.PHONY: initial-release
initial-release:
EC_VERSION=$(VERSION)-$(CURRENT_USER) \
APP_VERSION=appver-dev-$(shell LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c6) \
initial-release: EC_VERSION = $(VERSION)-$(CURRENT_USER)
initial-release: APP_VERSION = appver-dev-$(shell LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c6)
initial-release: check-env-EC_VERSION check-env-APP_VERSION
UPLOAD_BINARIES=0 \
./scripts/build-and-release.sh

.PHONY: rebuild-release
rebuild-release: EC_VERSION = $(VERSION)-$(CURRENT_USER)
rebuild-release: check-env-EC_VERSION check-env-APP_VERSION
UPLOAD_BINARIES=0 \
SKIP_RELEASE=1 \
./scripts/build-and-release.sh

.PHONY: upgrade-release
upgrade-release:
EC_VERSION=$(VERSION)-$(CURRENT_USER)-upgrade \
APP_VERSION=appver-dev-$(shell LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c6)-upgrade \
upgrade-release: EC_VERSION = $(VERSION)-$(CURRENT_USER)-upgrade
upgrade-release: APP_VERSION = appver-dev-$(shell LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c6)-upgrade
upgrade-release: check-env-EC_VERSION check-env-APP_VERSION
UPLOAD_BINARIES=1 \
./scripts/build-and-release.sh

Expand Down Expand Up @@ -198,6 +205,13 @@ embedded-cluster-linux-arm64: static go.mod embedded-cluster
mkdir -p ./output/bin
cp ./build/embedded-cluster-$(OS)-$(ARCH) ./output/bin/$(APP_NAME)

.PHONY: embedded-cluster-darwin-arm64
embedded-cluster-darwin-arm64: OS = darwin
embedded-cluster-darwin-arm64: ARCH = arm64
embedded-cluster-darwin-arm64: go.mod embedded-cluster
mkdir -p ./output/bin
cp ./build/embedded-cluster-$(OS)-$(ARCH) ./output/bin/$(APP_NAME)

.PHONY: embedded-cluster
embedded-cluster:
CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build \
Expand Down Expand Up @@ -270,6 +284,7 @@ list-distros:
.PHONY: create-node%
create-node%: DISTRO = debian-bookworm
create-node%: NODE_PORT = 30000
create-node%: K0S_DATA_DIR = /var/lib/k0s
create-node%:
@if ! docker images | grep -q ec-$(DISTRO); then \
$(MAKE) -C dev/distros build-$(DISTRO); \
Expand All @@ -280,7 +295,7 @@ create-node%:
--hostname node$* \
--privileged \
--cgroupns=host \
-v /var/lib/k0s \
-v $(K0S_DATA_DIR) \
-v $(shell pwd):/replicatedhq/embedded-cluster \
-v $(shell dirname $(shell pwd))/kots:/replicatedhq/kots \
$(if $(filter node0,node$*),-p $(NODE_PORT):$(NODE_PORT)) \
Expand Down

0 comments on commit 2ff6d0e

Please sign in to comment.