mirror of https://github.com/keeweb/keeweb
update.json
This commit is contained in:
parent
4f96629e22
commit
2a7cd3574d
13
Gruntfile.js
13
Gruntfile.js
|
@ -25,7 +25,6 @@ module.exports = function (grunt) {
|
|||
|
||||
const dt = date.toISOString().replace(/T.*/, '');
|
||||
const year = date.getFullYear();
|
||||
const minElectronVersionForUpdate = '11.0.3';
|
||||
const zipCommentPlaceholderPart = 'zip_comment_placeholder_that_will_be_replaced_with_hash';
|
||||
const zipCommentPlaceholder =
|
||||
zipCommentPlaceholderPart + '.'.repeat(512 - zipCommentPlaceholderPart.length);
|
||||
|
@ -295,20 +294,20 @@ module.exports = function (grunt) {
|
|||
}
|
||||
},
|
||||
'string-replace': {
|
||||
manifest: {
|
||||
'update-manifest': {
|
||||
options: {
|
||||
replacements: [
|
||||
{
|
||||
pattern: '# YYYY-MM-DD:v0.0.0',
|
||||
replacement: '# ' + dt + ':v' + pkg.version
|
||||
pattern: /"version":\s*".*?"/,
|
||||
replacement: `"version": "${pkg.version}"`
|
||||
},
|
||||
{
|
||||
pattern: '# updmin:v0.0.0',
|
||||
replacement: '# updmin:v' + minElectronVersionForUpdate
|
||||
pattern: /"date":\s*".*?"/,
|
||||
replacement: `"date": "${dt}"`
|
||||
}
|
||||
]
|
||||
},
|
||||
files: { 'dist/manifest.appcache': 'app/manifest.appcache' }
|
||||
files: { 'dist/update.json': 'app/update.json' }
|
||||
},
|
||||
'service-worker': {
|
||||
options: { replacements: [{ pattern: '0.0.0', replacement: pkg.version }] },
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
# YYYY-MM-DD:v0.0.0
|
||||
# updmin:v0.0.0
|
||||
|
||||
NETWORK:
|
||||
*
|
|
@ -10,7 +10,7 @@ const Links = {
|
|||
UpdateDesktop: 'https://github.com/keeweb/keeweb/releases/download/v{ver}/UpdateDesktop.zip',
|
||||
ReleaseNotes: 'https://github.com/keeweb/keeweb/blob/master/release-notes.md#release-notes',
|
||||
SelfHostedDropbox: 'https://github.com/keeweb/keeweb#self-hosting',
|
||||
Manifest: 'https://app.keeweb.info/manifest.appcache',
|
||||
UpdateJson: 'https://app.keeweb.info/update.json',
|
||||
AutoType: 'https://github.com/keeweb/keeweb/wiki/Auto-Type',
|
||||
Translation: 'https://keeweb.oneskyapp.com/',
|
||||
Donation: 'https://opencollective.com/keeweb#support',
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": "0.0.0",
|
||||
"date": "0000-00-00"
|
||||
}
|
|
@ -13,7 +13,7 @@ module.exports = function (grunt) {
|
|||
'csp-hashes',
|
||||
'copy:content-dist',
|
||||
'string-replace:service-worker',
|
||||
'string-replace:manifest',
|
||||
'string-replace:update-manifest',
|
||||
'copy:dist-icons',
|
||||
'copy:dist-manifest'
|
||||
]);
|
||||
|
|
|
@ -188,10 +188,6 @@ function servePlugin(packageName) {
|
|||
});
|
||||
}
|
||||
};
|
||||
const serveManifestAppCache = (res) => {
|
||||
res.writeHead(200);
|
||||
res.end('CACHE MANIFEST\nNETWORK:\n*\n');
|
||||
};
|
||||
const serveConfig = (res) => {
|
||||
res.writeHead(200);
|
||||
res.end(`{"settings":{},"plugins":[{"url":"/"}]}`);
|
||||
|
@ -211,8 +207,6 @@ function servePlugin(packageName) {
|
|||
}
|
||||
if (req.url === '/') {
|
||||
return serveKeeWebHtml(res);
|
||||
} else if (req.url === '/manifest.appcache') {
|
||||
return serveManifestAppCache(res);
|
||||
} else if (req.url === '/config.json') {
|
||||
return serveConfig(res);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue