You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use buildpack to set git commit SHA during Heroku build
Heroku does not provide access to Git via the command line, so the methods that work for the dev and test environments won't work here. Instead, we can utilize an additional buildpack in .buildpacks to write the SOURCE_VERSION environment variable to a file named .source_version in the application root. We cannot reference this environment variable directly from the app because Heroku only makes it available during the compilation phase of the build, hence the need to use a buildpack to write it to a file for later use by the app.
0 commit comments