Skip to content

Commit

Permalink
Convert all npm run to npx
Browse files Browse the repository at this point in the history
  • Loading branch information
kirtangajjar committed Jul 4, 2024
1 parent 4c249a8 commit b1ad11d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/bin/initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
set -e

npx wp-env run tests-wordpress chmod -c ugo+w /var/www/html
npm run env run tests-cli wp rewrite structure '/%postname%/' --hard
npx wp-env run tests-cli wp rewrite structure '/%postname%/' --hard

status=0
npm run env run tests-cli wp site list || status=$?
npx wp-env run tests-cli wp site list || status=$?

if [ $status -eq 0 ]
then
echo "Multisite already initialized"
else
echo "Converting to multisite"
npm run env run tests-cli wp core multisite-convert --title='Distributor Multisite'
npm run env run tests-cli wp user create second '[email protected]' --user_pass=password --role=administrator
npm run env run tests-cli wp site create --slug=second --title='Second Site' --email='[email protected]'
npm run env run tests-cli wp theme enable twentytwentyone --activate
npm run env run tests-cli wp theme enable twentytwentyone --url=localhost/second --activate
npm run env run tests-cli cp wp-content/plugins/distributor/tests/cypress/.htaccess .htaccess
npx wp-env run tests-cli wp core multisite-convert --title='Distributor Multisite'
npx wp-env run tests-cli wp user create second '[email protected]' --user_pass=password --role=administrator
npx wp-env run tests-cli wp site create --slug=second --title='Second Site' --email='[email protected]'
npx wp-env run tests-cli wp theme enable twentytwentyone --activate
npx wp-env run tests-cli wp theme enable twentytwentyone --url=localhost/second --activate
npx wp-env run tests-cli cp wp-content/plugins/distributor/tests/cypress/.htaccess .htaccess
fi

0 comments on commit b1ad11d

Please sign in to comment.