I deploy a JAR file to Heroku using the heroku-cli-deploy
plugin:
heroku deploy:jar webapp.jar
If I run this command inside a Git repository, the version of the displayed in the Heroku dashboard is the version of the currently checked out commit.
If I run this out of a Git tree, there are no version info displayed in the dashboard.
Is there any chance to specify the SHA1 of the release programmatically without running the deploy command from inside the git repository ?
The version can be injected using the cli parameter
--build-version
. For example:heroku deploy:jar webapp.jar --app webapp --build-version `git rev-parse --short HEAD`
NOTE! It seems that Heroku is filtering the value and it has to be a git hash. So it's not possible to push
--build-version v1.0.0
for example.