Better config/version.rb handling and loading more variables from it

(Darix) #1

I run my discourse instance from an rpm instead of git. that means may parts of discourse that try to find out the version from git fail in my installation. while investigating this i noticed that there is already code to load the version information from a file. But that code had a lot of duplicates. So i moved the common code into a function and then added another function to return the full git describe string.

Would this patch be acceptable?

(Darix) #2

Does the patch need any improvements or is it ok as is?

(Sam Saffron) #3

In principle I am ok with it just worried it may break CI or plugin UI

(Darix) #4

code flow should be the same still.i also tested without config/version.rb and only some values set i config/version.rb.

(Sam Saffron) #5

Send thorough a PR we can have a look

(Darix) #6