Skip to content

Commit

Permalink
Replace publish.sh with "composer publish" custom command
Browse files Browse the repository at this point in the history
  • Loading branch information
beryllium committed Feb 17, 2021
1 parent b30debf commit 4c8d604
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
],
"scripts": {
"publish": [
"./publish.sh"
"yarn encore prod || ( echo \"Could not generate Webpack assets\" && exit )",
"sculpin generate --env=prod || ( echo \"Could not generate the site\" && exit )",
"sculpin assets:install --env=prod output_prod || ( echo \"Could not install assets for the site\" && exit )",
"rsync -avze 'ssh -p 4668' output_prod/ username@yoursculpinsite:public_html || ( echo \"Could not publish the site\" && exit )"
],
"sculpin-watch": [
"Composer\\Config::disableProcessTimeout",
Expand Down
4 changes: 4 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

echo "This script has been replaced by the 'composer publish' custom command"
echo
echo "Continuing with legacy execution ..."

vendor/bin/sculpin generate --env=prod
if [ $? -ne 0 ]; then echo "Could not generate the site"; exit 1; fi

Expand Down

0 comments on commit 4c8d604

Please sign in to comment.