mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 21:26:00 +00:00
fix
This commit is contained in:
3
.github/workflows/build-app.yaml
vendored
3
.github/workflows/build-app.yaml
vendored
@@ -59,8 +59,6 @@ jobs:
|
|||||||
mv app/dist/*.deb artifacts/ || true
|
mv app/dist/*.deb artifacts/ || true
|
||||||
mv app/dist/*.dmg artifacts/ || true
|
mv app/dist/*.dmg artifacts/ || true
|
||||||
|
|
||||||
mv app/dist/dbgate-pad.xml artifacts/ || true
|
|
||||||
|
|
||||||
# - name: Copy artifacts Linux, MacOs
|
# - name: Copy artifacts Linux, MacOs
|
||||||
# if: matrix.os != 'windows-2016'
|
# if: matrix.os != 'windows-2016'
|
||||||
# run: |
|
# run: |
|
||||||
@@ -89,6 +87,7 @@ jobs:
|
|||||||
if: matrix.os == 'windows-2016'
|
if: matrix.os == 'windows-2016'
|
||||||
run: |
|
run: |
|
||||||
mv app/dist/latest.yml artifacts/latest.yml || true
|
mv app/dist/latest.yml artifacts/latest.yml || true
|
||||||
|
mv app/dist/dbgate-pad.xml artifacts/ || true
|
||||||
|
|
||||||
- name: Copy latest-linux.yml
|
- name: Copy latest-linux.yml
|
||||||
if: matrix.os == 'ubuntu-18.04'
|
if: matrix.os == 'ubuntu-18.04'
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ let size = 0;
|
|||||||
const files = fs.readdirSync('app/dist');
|
const files = fs.readdirSync('app/dist');
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
if (file.endsWith('.exe')) {
|
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;
|
size = stats.size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,4 +26,6 @@ const padContent = template
|
|||||||
.replace('#SIZE_KB#', Math.round(size / 1024))
|
.replace('#SIZE_KB#', Math.round(size / 1024))
|
||||||
.replace('#SIZE_MB#', Math.round(size / 1024 / 1024));
|
.replace('#SIZE_MB#', Math.round(size / 1024 / 1024));
|
||||||
|
|
||||||
|
if (size > 0) {
|
||||||
fs.writeFileSync('app/dist/dbgate-pad.xml', padContent, 'utf-8');
|
fs.writeFileSync('app/dist/dbgate-pad.xml', padContent, 'utf-8');
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user