From 7452a178bd7134598b3a0db49afb12c2326f1909 Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Tue, 20 Jun 2023 09:27:54 +0200 Subject: [PATCH] fix env vars in netlify config Signed-off-by: Moritz Wiesinger --- netlify.toml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/netlify.toml b/netlify.toml index e2b8daff114..84e2179f16c 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,7 +5,7 @@ publish = "public/" # On netlify our branch will always be the one we are currently building for # important information regarding naming # https://gohugo.io/getting-started/configuration/#configure-with-environment-variables -command = "HUGOxPARAMSxGITHUB_BRANCH=$BRANCH hugo -b $DEPLOY_PRIME_URL" +command = "HUGOxPARAMSxCURRENTVERSION=$BRANCH HUGOxPARAMSxGITHUB_BRANCH=$BRANCH hugo -b $DEPLOY_PRIME_URL" ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml" [build.environment] @@ -14,13 +14,7 @@ ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml" HUGO_VERSION = "0.111.3" HUGO_ENABLEGITINFO = "true" -# On netlify our branch will always be the one we are currently building for -# important information regarding naming -# https://gohugo.io/getting-started/configuration/#configure-with-environment-variables -HUGOxPARAMSxGITHUB_BRANCH="$BRANCH" -HUGOxPARAMSxCURRENTVERSION="$BRANCH" - -[context.deploy-preview] +[context.deploy-preview.environment] HUGO_ENV = "development" [context.branch-deploy.environment] @@ -33,4 +27,4 @@ HUGO_ENV = "production" # On netlify our branch will always be the one we are currently building for # important information regarding naming # https://gohugo.io/getting-started/configuration/#configure-with-environment-variables -command = "HUGOxPARAMSxGITHUB_BRANCH=$BRANCH hugo -b $URL" +command = "HUGOxPARAMSxCURRENTVERSION=$BRANCH HUGOxPARAMSxGITHUB_BRANCH=$BRANCH hugo -b $URL"