Every time I push my app to heroku I see the line
-----> Launching... done, v43
Is there a way to make that version number apear within the
Following @jassa answer - but using the more recent PlatformAPI
if (app_name = ENV["HEROKU_APP_NAME"]).present? and ENV['HEROKU_API_KEY'].present?
require 'platform-api'
heroku = PlatformAPI.connect(ENV['HEROKU_API_KEY'], default_headers: {'Range' => 'version ..; order=desc'})
released_at_s = heroku.app.info(app_name)['released_at']
released_at_d = Time.parse(released_at_s).strftime('%Y-%m-%d')
release = heroku.release.list(app_name).first
deploy_v = release['description']
version = release['version']
ENV['HEROKU_RELEASE_NAME'] = "#{version} (#{deploy_v}) #{released_at_d}"
end