Deployment helpers map a small target name to the destination and caching policy used by the publish command.

Program

Play the script to choose the target and see the destination plan.

deploy_target_plan.sh
#!/usr/bin/env bash

target=
if [ "$target" = "prod" ]; then
    destination="s3://app-prod"
    cache="max-age=300"
else
    destination="s3://app-staging"
    cache="no-cache"
fi
echo "$target -> $destination ($cache)"
#!/usr/bin/env bash

target=
if [ "$target" = "prod" ]; then
    destination="s3://app-prod"
    cache="max-age=300"
else
    destination="s3://app-staging"
    cache="no-cache"
fi
echo "$target -> $destination ($cache)"
target A deployment target is a small name for an environment.
destination The destination should be derived from the target, not typed repeatedly.
cache policy Deployment scripts often pair a destination with a cache setting.