Improve the build script

This commit is contained in:
varjolintu 2019-03-28 13:27:44 +02:00
parent c852ba226d
commit f041703315
10 changed files with 295 additions and 7 deletions

9
.tx/config Normal file
View file

@ -0,0 +1,9 @@
[main]
host = https://www.transifex.com
[keepassxc-browser.messagesjson]
file_filter = keepassxc-browser/_locales/<lang>/messages.json
minimum_perc = 60
source_file = keepassxc-browser/_locales/en/messages.json
source_lang = en
type = CHROME

View file

@ -2,6 +2,8 @@
const fs = require('fs');
const extra = require('fs-extra');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const zaf = require('zip-a-folder');
const DEST = 'keepassxc-browser';
@ -31,7 +33,14 @@ function adjustManifest(manifest) {
return `keepassxc-browser_${data['version']}_${browser}.zip`;
}
async function updateTranslations() {
console.log('Pulling translations from Transifex, please wait...');
const { stdout } = await exec('tx pull -af');
console.log(stdout);
}
(async() => {
await updateTranslations();
fs.copyFileSync(`${DEST}/manifest.json`, `./${DEFAULT}`);
for (const browser in BROWSERS) {
@ -45,4 +54,4 @@ function adjustManifest(manifest) {
}
fs.renameSync(DEFAULT, `${DEST}/manifest.json`);
})()
})();

View file

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100"
height="100"
viewBox="0 0 99.999997 100"
id="svg2"
version="1.1">
<defs
id="defs4">
<linearGradient
id="linearGradient4257">
<stop
style="stop-color:#808080;stop-opacity:1"
offset="0"
id="stop4259" />
<stop
style="stop-color:#4d4d4d;stop-opacity:1"
offset="1"
id="stop4261" />
</linearGradient>
<linearGradient
id="linearGradient4316-3-6">
<stop
style="stop-color:#226e23;stop-opacity:1"
offset="0"
id="stop4173" />
<stop
style="stop-color:#63ab3a;stop-opacity:1"
offset="1"
id="stop4175" />
</linearGradient>
<linearGradient
id="linearGradient4316-3">
<stop
id="stop4167"
offset="0"
style="stop-color:#226e23;stop-opacity:1" />
<stop
id="stop4169"
offset="1"
style="stop-color:#63ab3a;stop-opacity:1" />
</linearGradient>
<linearGradient
id="linearGradient4316">
<stop
style="stop-color:#226e23;stop-opacity:1"
offset="0"
id="stop4318" />
<stop
style="stop-color:#63ab3a;stop-opacity:1"
offset="1"
id="stop4320" />
</linearGradient>
<linearGradient
id="linearGradient4153"
osb:paint="solid">
<stop
style="stop-color:#b3b3b3;stop-opacity:1;"
offset="0"
id="stop4155" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient4316"
id="linearGradient4324"
x1="50.757614"
y1="964.83679"
x2="50.757614"
y2="1042.2632"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0561225,0,0,1.0561225,-2.8061215,-1008.6172)" />
<radialGradient
gradientUnits="userSpaceOnUse"
r="43.571938"
fy="41.189114"
fx="-82.91127"
cy="41.189114"
cx="-82.91127"
id="radialGradient5106"
xlink:href="#linearGradient4316" />
<linearGradient
xlink:href="#linearGradient4316"
id="linearGradient4324-3"
x1="50.757614"
y1="964.83679"
x2="50.757614"
y2="1042.2632"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0561225,0,0,1.0561225,118.96071,-1109.1994)" />
<linearGradient
xlink:href="#linearGradient4316"
id="linearGradient4324-3-6"
x1="50.757614"
y1="964.83679"
x2="50.757614"
y2="1042.2632"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0561225,0,0,1.0561225,-2.8061235,-1008.6171)" />
<linearGradient
gradientUnits="userSpaceOnUse"
y2="86.356995"
x2="53.238865"
y1="12.753036"
x1="53.238865"
id="linearGradient5199"
xlink:href="#linearGradient4316-3-6" />
<linearGradient
xlink:href="#linearGradient4257"
id="linearGradient4263"
x1="50.09866"
y1="86.831215"
x2="49.526104"
y2="8.6772995"
gradientUnits="userSpaceOnUse" />
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<circle
cy="50"
cx="50"
id="path5201"
style="opacity:0.87099998;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.13186812;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.78431373"
r="45.934067" />
<circle
r="42.32143"
cy="50.000023"
cx="50"
id="path3336"
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path4264"
d="M 50,6.3242189 A 43.676472,43.676472 0 0 0 6.3242189,50 43.676472,43.676472 0 0 0 50,93.675781 43.676472,43.676472 0 0 0 93.675781,50 43.676472,43.676472 0 0 0 50,6.3242189 Z m 0,6.7109371 c 2.26423,0.0083 4.523397,0.224904 6.748047,0.646485 0.10716,0.48368 0.167969,0.98402 0.167969,1.5 0,3.82265 -3.097269,6.918015 -6.917969,6.916015 -3.82069,0.0022 -6.916016,-3.091382 -6.916016,-6.914062 0,-0.5181 0.06204,-1.02034 0.169922,-1.50586 C 45.476743,13.257569 47.7359,13.042035 50,13.035156 Z m -18.994141,5.298828 c -0.24053,1.21916 -0.371333,2.474142 -0.371093,3.763672 0,7.71966 4.528393,14.367959 11.064453,17.480469 l 0,35.089844 8.298828,8.298828 8.300781,-8.300781 -0.476562,-7.34961 3.914062,-3.912109 -3.914062,-3.912109 5.871093,-5.867188 -5.871093,-5.871094 0.476562,-8.177734 c 6.53802,-3.11057 11.066406,-9.758856 11.066406,-17.478516 0,-1.28696 -0.133397,-2.540982 -0.373046,-3.757812 C 80.124647,25.007387 86.946634,37.023584 86.964844,50 86.964304,70.414588 70.41459,86.964292 50,86.964844 29.58541,86.964292 13.035701,70.414589 13.035156,50 13.050706,37.021755 19.872279,25.003208 31.005859,18.333984 Z m 13.458985,25.898438 2.767578,0 0,27.666016 -2.765625,0 -0.002,-27.664063 0,-0.002 z"
style="opacity:1;fill:#f9f9f9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path3336-3-2-7"
d="m 56.747561,13.681815 c 0.107159,0.48368 0.16838,0.98465 0.16838,1.50063 0,3.822651 -3.097351,6.917921 -6.91805,6.915921 -3.82069,0.0022 -6.91594,-3.09115 -6.91594,-6.913831 0,-0.5181 0.0626,-1.02142 0.17048,-1.50694 C 45.477221,13.25743 47.7359,13.042554 50,13.035675 c 2.26423,0.0083 4.52291,0.224559 6.74756,0.64614 z m -26.11261,8.416551 c 0,7.71966 4.528179,14.36677 11.064239,17.47928 l 0,35.091179 8.2987,8.2987 8.30082,-8.3008 -0.47566,-7.3495 3.91258,-3.9126 -3.91258,-3.9126 5.86992,-5.867799 -5.86992,-5.8699 0.47565,-8.17878 c 6.53802,-3.11057 11.06635,-9.75752 11.06635,-17.47718 0,-1.28696 -0.13288,-2.54209 -0.37253,-3.75892 11.132459,6.667543 17.953549,18.684164 17.97176,31.66058 C 86.96374,70.414615 70.414591,86.963775 50,86.964325 29.58541,86.963775 13.03626,70.414615 13.03572,50.000026 c 0.0155,-12.978245 6.83607,-24.997676 17.96965,-31.6669 -0.24053,1.21916 -0.37066,2.47571 -0.37042,3.76524 z m 13.829769,22.13472 2.76764,0 0,27.665839 -2.76554,0 -0.002,-27.663749 0,-0.002 z"
style="opacity:0.94;fill:url(#linearGradient4263);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
id="svg2"
viewBox="0 0 99.999997 100"
height="100"
width="100">
<defs
id="defs4">
<linearGradient
id="linearGradient4316">
<stop
id="stop4318"
offset="0"
style="stop-color:#226e23;stop-opacity:1" />
<stop
id="stop4320"
offset="1"
style="stop-color:#63ab3a;stop-opacity:1" />
</linearGradient>
<linearGradient
osb:paint="solid"
id="linearGradient4153">
<stop
id="stop4155"
offset="0"
style="stop-color:#b3b3b3;stop-opacity:1;" />
</linearGradient>
<linearGradient
gradientTransform="matrix(1.0561225,0,0,1.0561225,-2.8061215,-1008.6172)"
gradientUnits="userSpaceOnUse"
y2="1042.2632"
x2="50.757614"
y1="964.83679"
x1="50.757614"
id="linearGradient4324"
xlink:href="#linearGradient4316" />
<radialGradient
xlink:href="#linearGradient4316"
id="radialGradient5106"
cx="-82.91127"
cy="41.189114"
fx="-82.91127"
fy="41.189114"
r="43.571938"
gradientUnits="userSpaceOnUse" />
<linearGradient
gradientTransform="matrix(1.0561225,0,0,1.0561225,118.96071,-1109.1994)"
gradientUnits="userSpaceOnUse"
y2="1042.2632"
x2="50.757614"
y1="964.83679"
x1="50.757614"
id="linearGradient4324-3"
xlink:href="#linearGradient4316" />
<linearGradient
gradientTransform="matrix(1.0561225,0,0,1.0561225,-2.8061235,-1008.6171)"
gradientUnits="userSpaceOnUse"
y2="1042.2632"
x2="50.757614"
y1="964.83679"
x1="50.757614"
id="linearGradient4324-3-6"
xlink:href="#linearGradient4316" />
<linearGradient
xlink:href="#linearGradient4316"
id="linearGradient5199"
x1="53.238865"
y1="12.753036"
x2="53.238865"
y2="86.356995"
gradientUnits="userSpaceOnUse" />
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<circle
r="45.934067"
style="opacity:0.87099998;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.13186812;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.78431373"
id="path5201"
cx="50"
cy="50" />
<circle
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path3336"
cx="50"
cy="50.000023"
r="42.32143" />
<path
style="opacity:1;fill:#f9f9f9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 50,6.3242189 A 43.676472,43.676472 0 0 0 6.3242189,50 43.676472,43.676472 0 0 0 50,93.675781 43.676472,43.676472 0 0 0 93.675781,50 43.676472,43.676472 0 0 0 50,6.3242189 Z m 0,6.7109371 c 2.26423,0.0083 4.523397,0.224904 6.748047,0.646485 0.10716,0.48368 0.167969,0.98402 0.167969,1.5 0,3.82265 -3.097269,6.918015 -6.917969,6.916015 -3.82069,0.0022 -6.916016,-3.091382 -6.916016,-6.914062 0,-0.5181 0.06204,-1.02034 0.169922,-1.50586 C 45.476743,13.257569 47.7359,13.042035 50,13.035156 Z m -18.994141,5.298828 c -0.24053,1.21916 -0.371333,2.474142 -0.371093,3.763672 0,7.71966 4.528393,14.367959 11.064453,17.480469 l 0,35.089844 8.298828,8.298828 8.300781,-8.300781 -0.476562,-7.34961 3.914062,-3.912109 -3.914062,-3.912109 5.871093,-5.867188 -5.871093,-5.871094 0.476562,-8.177734 c 6.53802,-3.11057 11.066406,-9.758856 11.066406,-17.478516 0,-1.28696 -0.133397,-2.540982 -0.373046,-3.757812 C 80.124647,25.007387 86.946634,37.023584 86.964844,50 86.964304,70.414588 70.41459,86.964292 50,86.964844 29.58541,86.964292 13.035701,70.414589 13.035156,50 13.050706,37.021755 19.872279,25.003208 31.005859,18.333984 Z m 13.458985,25.898438 2.767578,0 0,27.666016 -2.765625,0 -0.002,-27.664063 0,-0.002 z"
id="path4264" />
<path
style="opacity:0.94;fill:url(#linearGradient5199);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 56.747561,13.681815 c 0.107159,0.48368 0.16838,0.98465 0.16838,1.50063 0,3.822651 -3.097351,6.917921 -6.91805,6.915921 -3.82069,0.0022 -6.91594,-3.09115 -6.91594,-6.913831 0,-0.5181 0.0626,-1.02142 0.17048,-1.50694 C 45.477221,13.25743 47.7359,13.042554 50,13.035675 c 2.26423,0.0083 4.52291,0.224559 6.74756,0.64614 z m -26.11261,8.416551 c 0,7.71966 4.528179,14.36677 11.064239,17.47928 l 0,35.091179 8.2987,8.2987 8.30082,-8.3008 -0.47566,-7.3495 3.91258,-3.9126 -3.91258,-3.9126 5.86992,-5.867799 -5.86992,-5.8699 0.47565,-8.17878 c 6.53802,-3.11057 11.06635,-9.75752 11.06635,-17.47718 0,-1.28696 -0.13288,-2.54209 -0.37253,-3.75892 11.132459,6.667543 17.953549,18.684164 17.97176,31.66058 C 86.96374,70.414615 70.414591,86.963775 50,86.964325 29.58541,86.963775 13.03626,70.414615 13.03572,50.000026 c 0.0155,-12.978245 6.83607,-24.997676 17.96965,-31.6669 -0.24053,1.21916 -0.37066,2.47571 -0.37042,3.76524 z m 13.829769,22.13472 2.76764,0 0,27.665839 -2.76554,0 -0.002,-27.663749 0,-0.002 z"
id="path3336-3-2-7" />
</svg>

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View file

@ -1,21 +1,24 @@
{
"manifest_version": 2,
"name": "KeePassXC-Browser",
"version": "1.3.3",
"version_name": "1.3.3",
"version": "1.4.0",
"version_name": "1.4.0",
"description": "__MSG_extensionDescription__",
"author": "KeePassXC Team",
"icons": {
"16": "icons/keepassxc_16x16.png",
"48": "icons/keepassxc_48x48.png",
"64": "icons/keepassxc_48x48.png",
"64": "icons/keepassxc_64x64.png",
"96": "icons/keepassxc_96x96.png",
"128": "icons/keepassxc_128x128.png"
},
"browser_action": {
"default_icon": {
"16": "icons/keepassxc_16x16.png",
"18": "icons/keepassxc_18x18.png",
"19": "icons/keepassxc_19x19.png",
"32": "icons/keepassxc_32x32.png",
"36": "icons/keepassxc_36x36.png",
"38": "icons/keepassxc_38x38.png",
"64": "icons/keepassxc_64x64.png"
},

4
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "keepassxc-browser",
"version": "1.3.2",
"name": "KeePassXC-Browser",
"version": "1.3.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "KeePassXC-Browser",
"version": "1.3.2",
"version": "1.3.3",
"description": "KeePassXC-Browser",
"main": "build.js",
"dependencies": {},