From 5e150c8cfcd62ecdb1f09023b145ff6a3d7c6d3e Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Tue, 29 Mar 2022 15:16:06 -0300 Subject: [PATCH] Change prod flag to avoid erros on new projects All new projects are created as "locked" by default so this allow their deployment. Additionally, a moreh helpful error message is added when NETLIFY_ACCOUNT cannot be found Fixes #1918 Signed-off-by: Marcos Lilljedahl --- pkg/universe.dagger.io/netlify/deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/universe.dagger.io/netlify/deploy.sh b/pkg/universe.dagger.io/netlify/deploy.sh index 85f5034b..164a3074 100755 --- a/pkg/universe.dagger.io/netlify/deploy.sh +++ b/pkg/universe.dagger.io/netlify/deploy.sh @@ -15,6 +15,7 @@ create_site() { # shellcheck disable=SC2181 if [ $? -ne 0 ]; then + >&2 echo "Error creating site [${NETLIFY_SITE_NAME}] for account [${NETLIFY_ACCOUNT}]" cat body >&2 exit 1 fi @@ -47,7 +48,7 @@ netlify link --id "$site_id" netlify deploy \ --build \ --site="$site_id" \ - --prodIfUnlocked | + --prod | tee /tmp/stdout url="$(grep ]+' | head -1)"