From efbcafc7cc7d14bec2a808f32f841ca73afb8ef8 Mon Sep 17 00:00:00 2001 From: Magesh K <47920326+mahee96@users.noreply.github.com> Date: Wed, 8 Jan 2025 06:33:21 +0530 Subject: [PATCH] [AltBackup]: added clean target to makefile to copy fresh from the build dir --- AltStore.xcodeproj/project.pbxproj | 2 +- Makefile | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/AltStore.xcodeproj/project.pbxproj b/AltStore.xcodeproj/project.pbxproj index 719fb277..69672d6d 100644 --- a/AltStore.xcodeproj/project.pbxproj +++ b/AltStore.xcodeproj/project.pbxproj @@ -2631,7 +2631,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/bin/sh\n\necho \"Build directory: $BUILD_DIR\"\necho \"Configuration build directory: $CONFIGURATION_BUILD_DIR\"\n\n# diagnostics\n# echo \">>>>>>>>> Xcode-Derived-Data <<<<<<<<<<\"\n# find \"$BUILD_DIR\" -maxdepth 7 -exec ls -ld {} + || true # List contents if directory exists \n# # ls -la ~/Library/Developer/Xcode/DerivedData || true # List contents if directory exists \n# echo \"\"\n\n# diagnostics\n# exit 0\n\n# Define the path to your Makefile\nMAKEFILE_PATH=\"${PROJECT_DIR}/\"\n\n# Navigate to the directory containing the Makefile\ncd \"$MAKEFILE_PATH\" || exit 1\n\n# Run the make target 'ipa-altbackup'\nmake -B copy-altbackup ipa-altbackup\n\n# Ensure that the ipa-altbackup process finishes before continuing\nif [ $? -ne 0 ]; then\n echo \"Error: ipa-altbackup failed\"\n exit 1\nelse\n echo \"ipa-altbackup completed successfully\"\nfi\n# Type a script or drag a script file from your workspace to insert its path.\n"; + shellScript = "#!/bin/sh\n\necho \"Build directory: $BUILD_DIR\"\necho \"Configuration build directory: $CONFIGURATION_BUILD_DIR\"\n\n# diagnostics\n# echo \">>>>>>>>> Xcode-Derived-Data <<<<<<<<<<\"\n# find \"$BUILD_DIR\" -maxdepth 7 -exec ls -ld {} + || true # List contents if directory exists \n# # ls -la ~/Library/Developer/Xcode/DerivedData || true # List contents if directory exists \n# echo \"\"\n\n# diagnostics\n# exit 0\n\n# Define the path to your Makefile\nMAKEFILE_PATH=\"${PROJECT_DIR}/\"\n\n# Navigate to the directory containing the Makefile\ncd \"$MAKEFILE_PATH\" || exit 1\n\n# Run the make target 'ipa-altbackup'\nmake -B clean-altbackup copy-altbackup ipa-altbackup\n\n# Ensure that the ipa-altbackup process finishes before continuing\nif [ $? -ne 0 ]; then\n echo \"Error: ipa-altbackup failed\"\n exit 1\nelse\n echo \"ipa-altbackup completed successfully\"\nfi\n# Type a script or drag a script file from your workspace to insert its path.\n"; }; AEDB4E9409D2CEE1EA126980 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; diff --git a/Makefile b/Makefile index 1b8a530e..5a1de4bd 100755 --- a/Makefile +++ b/Makefile @@ -330,7 +330,14 @@ ipa-altbackup: checkPaths copy-altbackup @cp -f "$(ALT_APP_IPA_DST)" AltStore/Resources @echo " IPA created: AltStore/Resources/AltBackup.ipa" -clean: +clean-altbackup: + @echo "" + @echo "====> Cleaning up AltBackup related artifacts <====" + @rm -rf build/altbackup.xcarchive/ + @rm -f build/AltBackup.ipa + @rm -f AltStore/Resources/AltBackup.ipa + +clean: clean-altbackup @rm -rf *.xcarchive/ @rm -rf *.dSYM/ @rm -rf SideStore.ipa