mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Doc: Better handling of platforms in changelog generation
This commit is contained in:
parent
7670ce32b1
commit
aa60923cbd
2
ElectronClient/app/package-lock.json
generated
2
ElectronClient/app/package-lock.json
generated
@ -4112,7 +4112,7 @@
|
||||
},
|
||||
"nan": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "http://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
|
||||
"integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA=="
|
||||
},
|
||||
"needle": {
|
||||
|
@ -81,17 +81,19 @@ function filterLogs(logs, platform) {
|
||||
|
||||
if (revertedLogs.indexOf(log.message) >= 0) continue;
|
||||
|
||||
const msg = log.message.trim().toLowerCase();
|
||||
let prefix = log.message.trim().toLowerCase().split(':');
|
||||
if (prefix.length <= 1) continue;
|
||||
prefix = prefix[0].split(',').map(s => s.trim());
|
||||
|
||||
let addIt = false;
|
||||
|
||||
if (msg.indexOf('all:') === 0 && platform !== 'clipper') addIt = true;
|
||||
if ((platform === 'android' || platform === 'ios') && msg.indexOf('mobile:') === 0) addIt = true;
|
||||
if (platform === 'android' && msg.indexOf('android:') === 0) addIt = true;
|
||||
if (platform === 'ios' && msg.indexOf('ios:') === 0) addIt = true;
|
||||
if (platform === 'desktop' && msg.indexOf('desktop:') === 0) addIt = true;
|
||||
if (platform === 'cli' && msg.indexOf('cli:') === 0) addIt = true;
|
||||
if (platform === 'clipper' && msg.indexOf('clipper:') === 0) addIt = true;
|
||||
if (prefix.indexOf('all') >= 0 && platform !== 'clipper') addIt = true;
|
||||
if ((platform === 'android' || platform === 'ios') && prefix.indexOf('mobile') >= 0) addIt = true;
|
||||
if (platform === 'android' && prefix.indexOf('android') >= 0) addIt = true;
|
||||
if (platform === 'ios' && prefix.indexOf('ios') >= 0) addIt = true;
|
||||
if (platform === 'desktop' && prefix.indexOf('desktop') >= 0) addIt = true;
|
||||
if (platform === 'cli' && prefix.indexOf('cli') >= 0) addIt = true;
|
||||
if (platform === 'clipper' && prefix.indexOf('clipper') >= 0) addIt = true;
|
||||
|
||||
if (addIt) output.push(log);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user