add beta/dev to userscript names so beta/developement versions can be installed alongside stable
This commit is contained in:
parent
52f41d6e01
commit
047381bb5d
@ -103,7 +103,9 @@ module.exports = (grunt) ->
|
|||||||
src: '*'
|
src: '*'
|
||||||
dest: 'builds/'
|
dest: 'builds/'
|
||||||
expand: true
|
expand: true
|
||||||
filter: 'isFile'
|
filter: (src) ->
|
||||||
|
pkg = grunt.config 'pkg'
|
||||||
|
grunt.file.isFile(src) and src isnt "testbuilds/#{pkg.name}#{pkg.meta.suffix.dev}.user.js"
|
||||||
|
|
||||||
coffee:
|
coffee:
|
||||||
script:
|
script:
|
||||||
@ -186,7 +188,11 @@ module.exports = (grunt) ->
|
|||||||
builds: 'builds'
|
builds: 'builds'
|
||||||
testbuilds: 'testbuilds'
|
testbuilds: 'testbuilds'
|
||||||
tmpcrx: ['tmp-crx', 'testbuilds/updates<%= pkg.meta.suffix.noupdate %>.xml']
|
tmpcrx: ['tmp-crx', 'testbuilds/updates<%= pkg.meta.suffix.noupdate %>.xml']
|
||||||
tmpuserscript: ['tmp-userscript', 'testbuilds/<%= pkg.name %><%= pkg.meta.suffix.noupdate %>.meta.js']
|
tmpuserscript: [
|
||||||
|
'tmp-userscript',
|
||||||
|
'testbuilds/<%= pkg.name %><%= pkg.meta.suffix.noupdate %>.meta.js',
|
||||||
|
'testbuilds/<%= pkg.name %><%= pkg.meta.suffix.dev %>.meta.js'
|
||||||
|
]
|
||||||
|
|
||||||
require('load-grunt-tasks') grunt
|
require('load-grunt-tasks') grunt
|
||||||
|
|
||||||
@ -253,6 +259,8 @@ module.exports = (grunt) ->
|
|||||||
'concat:userscript'
|
'concat:userscript'
|
||||||
'set-channel:noupdate'
|
'set-channel:noupdate'
|
||||||
'concat:userscript'
|
'concat:userscript'
|
||||||
|
'set-channel:dev'
|
||||||
|
'concat:userscript'
|
||||||
'clean:tmpuserscript'
|
'clean:tmpuserscript'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
11
package.json
11
package.json
@ -20,7 +20,14 @@
|
|||||||
"suffix": {
|
"suffix": {
|
||||||
"stable": "",
|
"stable": "",
|
||||||
"beta": "-beta",
|
"beta": "-beta",
|
||||||
"noupdate": "-noupdate"
|
"noupdate": "-noupdate",
|
||||||
|
"dev": "-dev"
|
||||||
|
},
|
||||||
|
"namesuffix": {
|
||||||
|
"stable": "",
|
||||||
|
"beta": " beta",
|
||||||
|
"noupdate": "",
|
||||||
|
"dev": " dev"
|
||||||
},
|
},
|
||||||
"min": {
|
"min": {
|
||||||
"chrome": "32",
|
"chrome": "32",
|
||||||
@ -57,4 +64,4 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10"
|
"node": ">=0.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name <%= meta.name %>
|
// @name <%= meta.name %><%= meta.namesuffix[channel] %>
|
||||||
// @version <%= meta.version %>
|
// @version <%= meta.version %>
|
||||||
// @minGMVer <%= meta.min.greasemonkey %>
|
// @minGMVer <%= meta.min.greasemonkey %>
|
||||||
// @minFFVer <%= meta.min.firefox %>
|
// @minFFVer <%= meta.min.firefox %>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// @grant GM_openInTab
|
// @grant GM_openInTab
|
||||||
// @grant GM_xmlhttpRequest
|
// @grant GM_xmlhttpRequest
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
<% if (channel !== 'noupdate') { %>// @updateURL <%= meta.downloads %><%= name %><%= meta.suffix[channel] %>.meta.js
|
<% if (channel !== 'dev') { %><% if (channel !== 'noupdate') { %>// @updateURL <%= meta.downloads %><%= name %><%= meta.suffix[channel] %>.meta.js
|
||||||
<% } %>// @downloadURL <%= meta.downloads %><%= name %><%= meta.suffix[channel] %>.user.js
|
<% } %>// @downloadURL <%= meta.downloads %><%= name %><%= meta.suffix[channel] %>.user.js
|
||||||
// @icon data:image/png;base64,<%= grunt.file.read('src/General/img/icon48.png', {encoding: 'base64'}) %>
|
<% } %>// @icon data:image/png;base64,<%= grunt.file.read('src/General/img/icon48.png', {encoding: 'base64'}) %>
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user