[AltBackup]: added clean target to makefile to copy fresh from the build dir

This commit is contained in:
Magesh K
2025-01-08 06:33:21 +05:30
parent c721fa01f9
commit efbcafc7cc
2 changed files with 9 additions and 2 deletions

View File

@@ -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;

View File

@@ -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