version suffix for beta

This commit is contained in:
antelle 2017-12-16 13:01:34 +01:00
parent 84b8c85d59
commit 70eb727d7a
2 changed files with 5 additions and 2 deletions

View File

@ -85,7 +85,10 @@ module.exports = function(grunt) {
replacement: function() { return '\n'; }
}]})},
{ test: /runtime-info\.js$/, loader: StringReplacePlugin.replace({ replacements: [
{ pattern: /@@VERSION/g, replacement: function() { return pkg.version; } },
{
pattern: /@@VERSION/g,
replacement: function () { return pkg.version + (grunt.option('beta') ? '-beta' : '') }
},
{ pattern: /@@DATE/g, replacement: function() { return dt; } },
{ pattern: /@@COMMIT/g, replacement: function() { return grunt.config.get('gitinfo.local.branch.current.shortSHA'); } }
]})},

View File

@ -69,7 +69,7 @@
"start": "grunt",
"test": "grunt test",
"postinstall": "cd desktop && npm install",
"build-beta": "grunt --skip-sign && sed 's/<html manifest=\"manifest.appcache\">//' dist/index.html > ../keeweb-beta/index.html && cd ../keeweb-beta && git add index.html && git commit -a -m 'beta' && git push origin master",
"build-beta": "grunt --skip-sign --beta && sed 's/<html manifest=\"manifest.appcache\">//' dist/index.html > ../keeweb-beta/index.html && cd ../keeweb-beta && git add index.html && git commit -a -m 'beta' && git push origin master",
"electron": "electron desktop --htmlpath=http://localhost:8085/tmp/"
},
"author": {