Replaced app/VERSION.txt with app/release.json

This commit is contained in:
Terence Monteiro 2015-03-13 12:32:39 +04:00
parent fab13e456f
commit ea19ec9688
3 changed files with 93 additions and 83 deletions

5
app/release.json Normal file
View File

@ -0,0 +1,5 @@
{
"version": "1.26.0",
"releasedate": "22/Dec/14"
}

View File

@ -1,8 +1,10 @@
(function (module) {
mifosX.controllers = _.extend(module, {
MainController: function (scope, location, sessionManager, translate, $rootScope, localStorageService, keyboardManager, $idle, tmhDynamicLocale, uiConfigService) {
$.get('VERSION.txt', function(data) { scope.version = data } );
scope.releasedate = "22/Dec/14"; //Day/Month/Year
$.getJSON('release.json', function(data) {
scope.version = data.version;
scope.releasedate = data.releasedate;
} );
uiConfigService.init();
//hides loader
scope.domReady = true;

View File

@ -1,11 +1,14 @@
#!/bin/bash
VERSION=$1
RELDATE=$2
if [ -z $VERSION ]; then
echo -e "Version required.\nUsage: $0 version"
if [ -z $VERSION -o -z $RELDATE ]; then
echo -e "Version required.\nUsage: $0 version releasedate"
fi
echo "Updating version to $VERSION"
echo $VERSION > app/VERSION.txt
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo -e "{\n \"version\": \"$VERSION\",\n \"releasedate\": \"$RELDATE\"\n}\n" > $DIR/app/release.json