Reflecting Heroku push version within the app

后端 未结 9 624
故里飘歌
故里飘歌 2021-01-30 09:17

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

9条回答
  •  一生所求
    2021-01-30 09:51

    You can make a Ruby file to do the following:

    require 'heroku'
    
    heroku = Heroku::Client.new('username','password')
    puts heroku.releases('appname')
    

    This returns a JSON document that contains a ton of metadata about your deploys include SHA, version number, etc.

提交回复
热议问题