From 1056810170ae597e9f56f4fbf82f5b738614beea Mon Sep 17 00:00:00 2001 From: idicesystem <79581397+PiyushDixit96@users.noreply.github.com> Date: Sun, 1 Dec 2024 22:07:51 +0530 Subject: [PATCH] Add support for configurable Heroku stack version Added a new environment variable HEROKU_STACK_VERSION that can be used to specify the desired Heroku stack version. Updated the buildHeroku and getHerokuCommand functions to use the specified stack version, or default to 24 if the environment variable is not set. Provided information about the available Heroku stack versions and their support details, as per the documentation from the Heroku DevCenter. https://devcenter.heroku.com/articles/stack#stack-support-details --- packages/server/src/utils/builders/heroku.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/server/src/utils/builders/heroku.ts b/packages/server/src/utils/builders/heroku.ts index 999b5fe6..21442d9a 100644 --- a/packages/server/src/utils/builders/heroku.ts +++ b/packages/server/src/utils/builders/heroku.ts @@ -16,13 +16,14 @@ export const buildHeroku = async ( application.project.env, ); try { + const builderVersion = env.HEROKU_STACK_VERSION || '24'; const args = [ "build", appName, "--path", buildAppDirectory, "--builder", - "heroku/builder:24", + `heroku/builder:${builderVersion}`, ]; for (const env of envVariables) { @@ -52,13 +53,14 @@ export const getHerokuCommand = ( application.project.env, ); + const builderVersion = env.HEROKU_STACK_VERSION || '24'; const args = [ "build", appName, "--path", buildAppDirectory, "--builder", - "heroku/builder:24", + `heroku/builder:${builderVersion}`, ]; for (const env of envVariables) {