Where do you store your Rails Application's version number?

前端 未结 8 1821
终归单人心
终归单人心 2021-01-30 05:41

We use the wonderful semantic versioning paradigm when versioning our rails app. One question I had was where is it best to store this number? I\'ve seen it stored in /l

8条回答
  •  野性不改
    2021-01-30 06:20

    Personally I prefer adding a constant to the application class.

    # file: config/initializers/version.rb
    class SomeApp::Application
      Version = '1.0.0'
    end
    

提交回复
热议问题