diff --git a/scripts/build-consumer-spin.sh b/scripts/build-consumer-spin.sh index f4320bfb5..815992ca6 100755 --- a/scripts/build-consumer-spin.sh +++ b/scripts/build-consumer-spin.sh @@ -3,11 +3,11 @@ . "$PWD/scripts/consumer-helper.sh" usage=" -Usage: $(basename "$0") [] +Usage: $(basename "$0") [] Build UI Extensions packages into a project - Target spin workspace, i.e. \`web.test.trish-ta.us.spin.dev\` + Target spin workspace short name, i.e. only enter \`web\` if your workspace is \`web.test.trish-ta.us.spin.dev\` Space separated package names default: ${AVAILABLE_PACKAGES[@]} diff --git a/scripts/consumer-helper.sh b/scripts/consumer-helper.sh index a3ef3e56b..48cab8384 100644 --- a/scripts/consumer-helper.sh +++ b/scripts/consumer-helper.sh @@ -1,6 +1,6 @@ #!/bin/sh -AVAILABLE_PACKAGES=('admin-ui-extensions' 'admin-ui-extensions-react' 'checkout-ui-extensions', 'checkout-ui-extensions-react', 'post-purchase-ui-extensions', 'post-purchase-ui-extensions-react', 'checkout-ui-extensions-run') +AVAILABLE_PACKAGES=('admin-ui-extensions' 'admin-ui-extensions-react' 'checkout-ui-extensions' 'checkout-ui-extensions-react' 'post-purchase-ui-extensions' 'post-purchase-ui-extensions-react' 'checkout-ui-extensions-run') ROOT=$(pwd) # Font color @@ -38,7 +38,7 @@ function run_command { if [[ -z $spin ]]; then $command else - ssh -o LogLevel=ERROR $projectDirectoryOrWorkspace $command + ssh -o LogLevel=ERROR `spin show | grep Shopify/$projectName | awk '{print $1}'` $command fi } @@ -214,7 +214,7 @@ function build_consumer { done - echo "💃 ${GREEN}Build copied to ${BOLD}$projectDirectory${NORMAL}.${NONE} Run the project to see your changes from UI Extensions packages." + echo "💃 ${GREEN}Build copied to ${BOLD}$projectDirectoryOrWorkspace${NORMAL}.${NONE} Run the project to see your changes from UI Extensions packages." exit 0 } diff --git a/scripts/restore-consumer-spin.sh b/scripts/restore-consumer-spin.sh index df684348e..6b047c944 100755 --- a/scripts/restore-consumer-spin.sh +++ b/scripts/restore-consumer-spin.sh @@ -3,11 +3,11 @@ . "$PWD/scripts/consumer-helper.sh" usage=" -Usage: $(basename "$0") +Usage: $(basename "$0") Restore a project by removing UI Extension packages and running \`yarn install\` - Target spin workspace, i.e. \`web.test.trish-ta.us.spin.dev\` + Target spin workspace short name, i.e. only enter \`web\` if your workspace is \`web.test.trish-ta.us.spin.dev\` Options: -h, --help Show this help text