Skip to content

Commit

Permalink
Add --clean flag to pod-install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
staszekscp committed Oct 3, 2024
1 parent a7382f6 commit db5157c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions scripts/pod-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,22 @@ cd "$ROOT_DIR" || exit 1

# See if we're in the HybridApp repo
IS_HYBRID_APP_REPO=$(scripts/is-hybrid-app-repo.sh)
NEW_DOT_FLAG="false"
SHOULD_CLEAN="false"

for arg in "$@"; do
if [ "$arg" == "--clean" ]; then
SHOULD_CLEAN="true"
elif [ "$arg" == "--new-dot" ]; then
NEW_DOT_FLAG="true"
fi
done


if [[ "$IS_HYBRID_APP_REPO" == "true" && "$1" != "--new-dot" ]]; then
if [[ "$IS_HYBRID_APP_REPO" == "true" && "$NEW_DOT_FLAG" == "false" ]]; then
cd ../ios
if [ "$1" == "--clean" ]; then
bundle exec pod deintegrate
if [ "$SHOULD_CLEAN" == "true" ]; then
bundle exec pod deintegrate
fi
# Navigate to the OldDot repository, and run pod install
bundle exec pod install
Expand Down Expand Up @@ -96,6 +107,9 @@ if [ -d "$CACHED_PODSPEC_DIR" ]; then
fi

cd ios || cleanupAndExit 1
if [ "$SHOULD_CLEAN" == "true" ]; then
bundle exec pod deintegrate
fi
bundle exec pod install

# Go back to where we started
Expand Down

0 comments on commit db5157c

Please sign in to comment.