Skip to content

Commit 1d50959

Browse files
authored
Merge pull request #13 from fooforge/add-version-env-variable
Add env variable for pscale version
2 parents ec45cf0 + 811eb72 commit 1d50959

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.pscale/cli-helper-scripts/use-pscale-docker-image.sh

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ function pscale {
2121
if [ -n "$NO_DOCKER" ]; then
2222
command="pscale $@"
2323
else
24-
command="docker run -e PLANETSCALE_SERVICE_TOKEN=$PLANETSCALE_SERVICE_TOKEN -e PLANETSCALE_SERVICE_TOKEN_ID=$PLANETSCALE_SERVICE_TOKEN_ID -e PLANETSCALE_SERVICE_TOKEN_NAME=$PLANETSCALE_SERVICE_TOKEN_NAME -e HOME=/tmp -v $HOME/.config/planetscale:/tmp/.config/planetscale -e PSCALE_ALLOW_NONINTERACTIVE_SHELL=true --user $(id -u):$(id -g) --rm -i $tty planetscale/pscale:latest $@"
24+
# For debugging, set PSCALE_VERSION to a version of your choice. It defaults to "latest".
25+
command="docker run -e PLANETSCALE_SERVICE_TOKEN=${PLANETSCALE_SERVICE_TOKEN:-""} -e PLANETSCALE_SERVICE_TOKEN_ID=$PLANETSCALE_SERVICE_TOKEN_ID -e PLANETSCALE_SERVICE_TOKEN_NAME=$PLANETSCALE_SERVICE_TOKEN_NAME -e HOME=/tmp -v $HOME/.config/planetscale:/tmp/.config/planetscale -e PSCALE_ALLOW_NONINTERACTIVE_SHELL=true --user $(id -u):$(id -g) --rm -i $tty planetscale/pscale:${PSCALE_VERSION:-"latest"} $@"
2526
fi
2627

2728
# if command is auth and we are running in CI, we will use the script command to get a fake terminal

0 commit comments

Comments
 (0)