This commit is contained in:
Jan Prochazka
2021-01-07 17:01:14 +01:00
parent d2471b63a9
commit 087a438a74
2 changed files with 5 additions and 4 deletions

View File

@@ -59,8 +59,6 @@ jobs:
mv app/dist/*.deb artifacts/ || true
mv app/dist/*.dmg artifacts/ || true
mv app/dist/dbgate-pad.xml artifacts/ || true
# - name: Copy artifacts Linux, MacOs
# if: matrix.os != 'windows-2016'
# run: |
@@ -89,6 +87,7 @@ jobs:
if: matrix.os == 'windows-2016'
run: |
mv app/dist/latest.yml artifacts/latest.yml || true
mv app/dist/dbgate-pad.xml artifacts/ || true
- name: Copy latest-linux.yml
if: matrix.os == 'ubuntu-18.04'

View File

@@ -12,7 +12,7 @@ let size = 0;
const files = fs.readdirSync('app/dist');
for (const file of files) {
if (file.endsWith('.exe')) {
const stats = fs.statSync(path.join('app', 'dist', 'file'));
const stats = fs.statSync(path.join('app', 'dist', file));
size = stats.size;
}
}
@@ -26,4 +26,6 @@ const padContent = template
.replace('#SIZE_KB#', Math.round(size / 1024))
.replace('#SIZE_MB#', Math.round(size / 1024 / 1024));
fs.writeFileSync('app/dist/dbgate-pad.xml', padContent, 'utf-8');
if (size > 0) {
fs.writeFileSync('app/dist/dbgate-pad.xml', padContent, 'utf-8');
}