[Beta-Suuport]: Added commit ID appending to version if in beta track build

This commit is contained in:
Magesh K
2024-12-17 17:00:53 +05:30
parent c41d25c19b
commit adee94819a
3 changed files with 36 additions and 2 deletions

View File

@@ -156,7 +156,31 @@ test:
## -- Building --
build:
# Fetch the latest commit ID if IS_BETA is defined
fetch_commit_id:
@echo ""
@if [ -n "$$IS_BETA" ]; then \
echo "'IS_BETA' is defined. Fetching the latest commit ID from HEAD..."; \
export COMMIT_ID=$$(git rev-parse --short HEAD); \
echo "Commit ID: $$COMMIT_ID"; \
else \
echo "'IS_BETA' is not defined. Skipping commit ID fetch."; \
fi
@echo ""
# Print release type based on the presence of COMMIT_ID
print_release_type:
@if [ -z "$$COMMIT_ID" ]; then \
echo ">>>>>>>> This is STABLE release <<<<<<<<<"; \
echo " Using default MARKETING_VERSION from project.pbxproj."; \
else \
echo ">>>>>>>> This is ALPHA/BETA release for commitID = $$COMMIT_ID <<<<<<<<<"; \
echo " Building with MARKETING_VERSION=$$COMMIT_ID"; \
fi
@echo ""
# Build target with the fetch_commit_id dependency
build: fetch_commit_id print_release_type
@xcodebuild -workspace AltStore.xcworkspace \
-scheme SideStore \
-sdk iphoneos \
@@ -166,7 +190,8 @@ build:
CODE_SIGNING_ALLOWED=NO \
DEVELOPMENT_TEAM=XYZ0123456 \
ORG_IDENTIFIER=com.SideStore \
DWARF_DSYM_FOLDER_PATH="."
DWARF_DSYM_FOLDER_PATH="." \
MARKETING_VERSION=$$COMMIT_ID
fakesign:
rm -rf archive.xcarchive/Products/Applications/SideStore.app/Frameworks/AltStoreCore.framework/Frameworks/