Refines the changesets mechanism.

- Adds an angular "value" that will contain an array of objects with version and change to be applied to the settings.
- Adds the possibility to run multiple changesets (e.g. upgrade from v1.0.0 to v1.0.2).
- Adds todos in the utils service for things related to version comparisons.
This commit is contained in:
Hyzual 2015-03-22 23:04:29 +01:00
parent a97e5159bc
commit ae703c1542
4 changed files with 90 additions and 25 deletions

View file

@ -248,6 +248,7 @@ angular.module('jamstash.utils', ['jamstash.settings.service'])
patch: pat
};
};
//TODO: Hyz: have "checkVersion" do the conversion themselves
this.checkVersion = function (runningVersion, minimumVersion) {
if (runningVersion.major >= minimumVersion.major) {
if (runningVersion.minor >= minimumVersion.minor) {
@ -263,6 +264,7 @@ angular.module('jamstash.utils', ['jamstash.settings.service'])
return false;
}
};
//TODO: Hyz: have "checkVersion" do the conversion themselves
this.checkVersionNewer = function (runningVersion, newVersion) {
if (runningVersion.major < newVersion.major) {
return true;