1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

store and retrieve app version in package.json

This commit is contained in:
Sylvain 2018-11-21 11:42:04 +01:00
parent 6e56ac4286
commit 0aa75488fa
3 changed files with 5 additions and 4 deletions

View File

@ -1 +0,0 @@
2.6.7

View File

@ -1,5 +1,6 @@
# Changelog Fab Manager
- Nom using standard [package.json](package.json) file to save application version number
- Fix a bug: on small screens, display of button "change group" overflow
## v2.6.7 2018 October 4

View File

@ -4,7 +4,8 @@ class API::VersionController < API::ApiController
def show
authorize :version
version = File.read('.fabmanager-version')
render json: {version: version}, status: :ok
package = File.read('package.json')
version = JSON.parse(package)['version']
render json: { version: version }, status: :ok
end
end
end