From 6996bb443e0722f4941a19f506c62026477913d5 Mon Sep 17 00:00:00 2001 From: Cristiano Tofani Date: Mon, 18 Nov 2024 15:43:43 +0100 Subject: [PATCH] script to replace packages --- .github/scripts/package-name-replacer.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/scripts/package-name-replacer.sh b/.github/scripts/package-name-replacer.sh index 3cd1cf0dd0b..c55271ff5a2 100755 --- a/.github/scripts/package-name-replacer.sh +++ b/.github/scripts/package-name-replacer.sh @@ -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" \ No newline at end of file