mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-23 13:20:48 +02:00
fix(land-and-deploy): stop greedy sed from eating the URL scheme in deploy-config parsing
The deploy-config bootstrap parsed "Production URL: https://x.com" with sed 's/.*: *//', which cuts at the LAST colon — the one in "https:" — yielding "//x.com". Cut at the first ": " instead (s/^[^:]*: *//). Resolver only; the generated land-and-deploy/SKILL.md regenerates from this source in the docs lane. Contributed by @briascoi (PRs #2555/#2493). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
e5dda3b3e1
commit
a73d868413
@@ -57,8 +57,11 @@ echo "$DEPLOY_CONFIG"
|
|||||||
|
|
||||||
# If config exists, parse it
|
# If config exists, parse it
|
||||||
if [ "$DEPLOY_CONFIG" != "NO_CONFIG" ]; then
|
if [ "$DEPLOY_CONFIG" != "NO_CONFIG" ]; then
|
||||||
PROD_URL=$(echo "$DEPLOY_CONFIG" | grep -i "production.*url" | head -1 | sed 's/.*: *//')
|
# Cut at the FIRST ": ", not the last. A greedy 's/.*: *//' ate the scheme of
|
||||||
PLATFORM=$(echo "$DEPLOY_CONFIG" | grep -i "platform" | head -1 | sed 's/.*: *//')
|
# any URL: "Production URL: https://x.com" became "//x.com", because the last
|
||||||
|
# ":" belongs to "https:".
|
||||||
|
PROD_URL=$(echo "$DEPLOY_CONFIG" | grep -i "production.*url" | head -1 | sed 's/^[^:]*: *//')
|
||||||
|
PLATFORM=$(echo "$DEPLOY_CONFIG" | grep -i "platform" | head -1 | sed 's/^[^:]*: *//')
|
||||||
echo "PERSISTED_PLATFORM:$PLATFORM"
|
echo "PERSISTED_PLATFORM:$PLATFORM"
|
||||||
echo "PERSISTED_URL:$PROD_URL"
|
echo "PERSISTED_URL:$PROD_URL"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user