diff --git a/scripts/init.sh b/scripts/init.sh index 65e427a..11ffeb7 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -2,7 +2,7 @@ set -e # Exit on error # Clean project -rm -rf .expo android ios node_modules vendor +rm -rf .expo dist android ios node_modules vendor # Install dependencies ./scripts/install-dependencies.sh diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 27a0473..b74e9e1 100755 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -21,4 +21,12 @@ fi # Install dependencies echo "Running '$PACKAGE_MANAGER install' in ${PWD}" -$PACKAGE_MANAGER install \ No newline at end of file +$PACKAGE_MANAGER install + +# Update PR Checks GitHub Action if required +if [ "$PACKAGE_MANAGER" = "yarn" ]; then + sed -i '' 's/cache: npm/cache: yarn/g' .github/workflows/PR\ Checks.yml + sed -i '' 's/npm install/yarn install/g' .github/workflows/PR\ Checks.yml + sed -i '' 's/npm run/yarn/g' .github/workflows/PR\ Checks.yml + sed -i '' 's/npx/yarn/g' .github/workflows/PR\ Checks.yml +fi \ No newline at end of file