Skip to content

Commit

Permalink
Entrypoint update for shopify CLI 3 auth flow
Browse files Browse the repository at this point in the history
  • Loading branch information
charlespwd committed Jan 5, 2024
1 parent 4d8adde commit 957eccd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ else
export SHOPIFY_PASSWORD="$SHOP_APP_PASSWORD"
fi

shopify login
export SHOPIFY_FLAG_STORE="$SHOPIFY_SHOP"
export SHOPIFY_CLI_THEME_TOKEN="$SHOPIFY_PASSWORD"
export SHOPIFY_CLI_TTY=0
# shopify auth login

host="https://${SHOP_STORE#*(https://|http://)}"
theme_root="${THEME_ROOT:-.}"
Expand All @@ -149,9 +152,9 @@ if [[ -n "${SHOP_PULL_THEME+x}" ]]; then
fi

theme_push_log="$(mktemp)"
shopify theme push --development --json $theme_root > "$theme_push_log" && cat "$theme_push_log"
preview_url="$(cat "$theme_push_log" | tail -n 1 | jq -r '.theme.preview_url')"
preview_id="$(cat "$theme_push_log" | tail -n 1 | jq -r '.theme.id')"
shopify theme push --development --json --path $theme_root > "$theme_push_log" && cat "$theme_push_log"
preview_url="$(cat "$theme_push_log" | jq -r '.theme.preview_url')"
preview_id="$(cat "$theme_push_log" | jq -r '.theme.id')"

step "Configuring Lighthouse CI"

Expand Down

0 comments on commit 957eccd

Please sign in to comment.