Gareth Fuller Gareth Fuller - 7 months ago 71
Git Question

Updating a Rails Engine Version Number

In a rails engine when should the version number in lib/myengine/version.rb be updated?

Should it be updated before every git push?

If so, can/should the version number be updated with some automation, rather than changing the number in the file every time?


That version number represents the version of your gem. So, if you publish a new release of your engine (using either gem publish or bundler's rake release), you need to update version.rb.

This doesn't have anything to do with git, so you can do git push without updating the version.rb.

Though maintaining a version number for your gem is not required, it is convention to follow semantic versioning patterns: