From 203a7e6f11a266ece4a853cc9abfbbe4dd228d89 Mon Sep 17 00:00:00 2001 From: Magesh K <47920326+mahee96@users.noreply.github.com> Date: Wed, 22 Jan 2025 02:02:50 +0530 Subject: [PATCH] [CI]: set to BUILD_CHANNEL based on CI build type --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b6e14108..c2a33d47 100755 --- a/Makefile +++ b/Makefile @@ -161,19 +161,24 @@ test: IS_ALPHA_TRUE := $(filter true TRUE 1, $(IS_ALPHA)) IS_BETA_TRUE := $(filter true TRUE 1, $(IS_BETA)) +# set build types to embed into Info.plist for key: BuildChannel +BUILD_CHANNEL := stable +BUILD_CHANNEL := $(if $(IS_ALPHA_TRUE),alpha,$(BUILD_CHANNEL)) +BUILD_CHANNEL := $(if $(IS_BETA_TRUE),beta,$(BUILD_CHANNEL)) + # Fetch the latest commit ID for ALPHA or BETA builds COMMIT_ID := $(if $(or $(IS_ALPHA_TRUE),$(IS_BETA_TRUE)),$(shell git rev-parse --short HEAD),) # Print release type based on the value of IS_ALPHA or IS_BETA print_release_type: @echo "" - @if [ "$(filter true TRUE 1,$(IS_ALPHA))" ]; then \ + @if [ $(IS_ALPHA_TRUE) ]; then \ echo "'IS_ALPHA' is set to true. Fetched the latest commit ID from HEAD..."; \ echo " Commit ID: $(COMMIT_ID)"; \ echo ""; \ echo ">>>>>>>> This is now an ALPHA release for COMMIT_ID = '$(COMMIT_ID)' <<<<<<<<<"; \ echo " Building with BUILD_REVISION = '$(COMMIT_ID)'"; \ - elif [ "$(filter true TRUE 1,$(IS_BETA))" ]; then \ + elif [ $(IS_BETA_TRUE) ]; then \ echo "'IS_BETA' is set to true. Fetched the latest commit ID from HEAD..."; \ echo " Commit ID: $(COMMIT_ID)"; \ echo ""; \ @@ -215,6 +220,7 @@ build: print_release_type DEVELOPMENT_TEAM=XYZ0123456 \ ORG_IDENTIFIER=com.SideStore \ BUILD_REVISION=$(COMMIT_ID) \ + BUILD_CHANNEL=$(BUILD_CHANNEL) BUNDLE_ID_SUFFIX= # DWARF_DSYM_FOLDER_PATH="."