Skip to content

Commit

Permalink
script to replace packages
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisTofani committed Nov 18, 2024
1 parent 2f01be0 commit 6996bb4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/scripts/package-name-replacer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ if [ ! -d "$DIRECTORY" ]; then
exit 1
fi

echo "Replacing $CHECK with $REPLACE into $DIRECTORY"
if [ "$DIRECTORY" == "android" ]; then
echo "Moving all to new subfolder canary"
mkdir ./android/app/src/debug/java/it/pagopa/io/app/canary
mv -v ./android/app/src/debug/java/it/pagopa/io/app/* ./android/app/src/debug/java/it/pagopa/io/app/canary
mkdir ./android/app/src/main/java/it/pagopa/io/app/canary
mv -v ./android/app/src/main/java/it/pagopa/io/app/* ./android/app/src/main/java/it/pagopa/io/app/canary
mkdir ./android/app/src/release/java/it/pagopa/io/app/canary
mv -v ./android/app/src/release/java/it/pagopa/io/app/* ./android/app/src/release/java/it/pagopa/io/app/canary
fi

echo "Renaming package $CHECK into $REPLACE in directory $DIRECTORY"
# Cerca i file contenenti la stringa e sostituisci
grep -rl "$CHECK" "$DIRECTORY" | xargs sed -i "" "s/$CHECK/$REPLACE/g"

0 comments on commit 6996bb4

Please sign in to comment.