Only depend on version.json where needed.
This commit is contained in:
parent
d0ede46e65
commit
e8a86d893e
11
Makefile
11
Makefile
@ -17,7 +17,7 @@ endif
|
|||||||
coffee := $(BIN)coffee -c --no-header
|
coffee := $(BIN)coffee -c --no-header
|
||||||
coffee_deps := node_modules/coffee-script/package.json
|
coffee_deps := node_modules/coffee-script/package.json
|
||||||
template := node tools/template.js
|
template := node tools/template.js
|
||||||
template_deps := package.json version.json tools/template.js node_modules/lodash/package.json
|
template_deps := package.json tools/template.js node_modules/lodash/package.json
|
||||||
cat := node tools/cat.js
|
cat := node tools/cat.js
|
||||||
cat_deps := tools/cat.js
|
cat_deps := tools/cat.js
|
||||||
jshint_deps := .jshintrc node_modules/jshint/package.json
|
jshint_deps := .jshintrc node_modules/jshint/package.json
|
||||||
@ -74,7 +74,8 @@ sources_bottom := \
|
|||||||
|
|
||||||
imports_top := \
|
imports_top := \
|
||||||
src/Archive/archives.json \
|
src/Archive/archives.json \
|
||||||
src/css/custom.css
|
src/css/custom.css \
|
||||||
|
version.json
|
||||||
imports_Monitoring := \
|
imports_Monitoring := \
|
||||||
src/meta/icon128.png
|
src/meta/icon128.png
|
||||||
imports_Miscellaneous := \
|
imports_Miscellaneous := \
|
||||||
@ -176,10 +177,10 @@ testbuilds/crx$1/eventPage.js : tmp/eventPage.js | testbuilds/crx$1
|
|||||||
testbuilds/crx$1/icon%.png : src/meta/icon%.png | testbuilds/crx$1
|
testbuilds/crx$1/icon%.png : src/meta/icon%.png | testbuilds/crx$1
|
||||||
$$(CP)
|
$$(CP)
|
||||||
|
|
||||||
testbuilds/crx$1/manifest.json : src/meta/manifest.json $(template_deps) | testbuilds/crx$1
|
testbuilds/crx$1/manifest.json : src/meta/manifest.json version.json $(template_deps) | testbuilds/crx$1
|
||||||
$(template) $$< $$@ type=crx channel=$1
|
$(template) $$< $$@ type=crx channel=$1
|
||||||
|
|
||||||
testbuilds/updates$1.xml : src/meta/updates.xml $(template_deps) | testbuilds/crx$1
|
testbuilds/updates$1.xml : src/meta/updates.xml version.json $(template_deps) | testbuilds/crx$1
|
||||||
$(template) $$< $$@ type=crx channel=$1
|
$(template) $$< $$@ type=crx channel=$1
|
||||||
|
|
||||||
testbuilds/$(name)$1.crx.zip : \
|
testbuilds/$(name)$1.crx.zip : \
|
||||||
@ -190,7 +191,7 @@ testbuilds/$(name)$1.crx.zip : \
|
|||||||
testbuilds/$(name)$1.crx : testbuilds/$(name)$1.crx.zip package.json tools/sign.js node_modules/crx/package.json
|
testbuilds/$(name)$1.crx : testbuilds/$(name)$1.crx.zip package.json tools/sign.js node_modules/crx/package.json
|
||||||
node tools/sign.js $1
|
node tools/sign.js $1
|
||||||
|
|
||||||
testbuilds/$(name)$1.meta.js : src/meta/metadata.js src/meta/icon48.png $(template_deps) | testbuilds
|
testbuilds/$(name)$1.meta.js : src/meta/metadata.js src/meta/icon48.png version.json $(template_deps) | testbuilds
|
||||||
$(template) $$< $$@ type=userscript channel=$1
|
$(template) $$< $$@ type=userscript channel=$1
|
||||||
|
|
||||||
testbuilds/$(name)$1.user.js : src/meta/botproc.js testbuilds/$(name)$1.meta.js LICENSE src/meta/usestrict.js tmp/script-userscript.js $(cat_deps)
|
testbuilds/$(name)$1.user.js : src/meta/botproc.js testbuilds/$(name)$1.meta.js LICENSE src/meta/usestrict.js tmp/script-userscript.js $(cat_deps)
|
||||||
|
|||||||
@ -3,7 +3,7 @@ c = console
|
|||||||
d = document
|
d = document
|
||||||
doc = d.documentElement
|
doc = d.documentElement
|
||||||
g =
|
g =
|
||||||
VERSION: '<%= meta.version %>'
|
VERSION: '<%= readJSON('version.json').version %>'
|
||||||
NAMESPACE: '<%= meta.name %>.'
|
NAMESPACE: '<%= meta.name %>.'
|
||||||
boards: {}
|
boards: {}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "<%= meta.name %>",
|
"name": "<%= meta.name %>",
|
||||||
"version": "<%= meta.version %>",
|
"version": "<%= readJSON('version.json').version %>",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"description": "<%= description %>",
|
"description": "<%= description %>",
|
||||||
"icons": {
|
"icons": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name <%= meta.name %><%= (channel === '-beta') ? ' beta' : '' %>
|
// @name <%= meta.name %><%= (channel === '-beta') ? ' beta' : '' %>
|
||||||
// @version <%= meta.version %>
|
// @version <%= readJSON('version.json').version %>
|
||||||
// @minGMVer <%= meta.min.greasemonkey %>
|
// @minGMVer <%= meta.min.greasemonkey %>
|
||||||
// @minFFVer <%= meta.min.firefox %>
|
// @minFFVer <%= meta.min.firefox %>
|
||||||
// @namespace <%= name %>
|
// @namespace <%= name %>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='<%= meta.appid %>'>
|
<app appid='<%= meta.appid %>'>
|
||||||
<updatecheck codebase='<%= meta.downloads %><%= name %><%= channel %>.crx' version='<%= meta.version %>' />
|
<updatecheck codebase='<%= meta.downloads %><%= name %><%= channel %>.crx' version='<%= readJSON('version.json').version %>' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -166,9 +166,8 @@ obj.assert = function(flagFile, statement) {
|
|||||||
return `throw new Error 'Assertion failed: ' + ${constExpression(statement)} unless ${statement}`;
|
return `throw new Error 'Assertion failed: ' + ${constExpression(statement)} unless ${statement}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Import variables from package.json and version.json.
|
// Import variables from package.json.
|
||||||
var pkg = readJSON('package.json');
|
var pkg = readJSON('package.json');
|
||||||
_.assign(pkg.meta, readJSON('version.json'));
|
|
||||||
|
|
||||||
// Take variables from command line.
|
// Take variables from command line.
|
||||||
for (var i = 4; i < process.argv.length; i++) {
|
for (var i = 4; i < process.argv.length; i++) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user