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
This commit is contained in:
idicesystem
2024-12-01 22:07:51 +05:30
committed by Mauricio Siu
parent 9d170e5f46
commit 1056810170

View File

@@ -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) {