Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 750bb3eb4b | |||
| b425985511 | |||
| 6651f1d610 | |||
| 5758720bfd | |||
| fcc4f1c2e8 | |||
| 01a113b2d3 | |||
| 0085a68e7e | |||
| 6868f26d6c | |||
| f4832a579c | |||
| 5bb34c9f0e | |||
| eb55f2276b | |||
| 3f1247459b | |||
| ddd9a10e6b | |||
| 45388e61f7 | |||
| 6752b84404 | |||
| 8e227b3b18 | |||
| 06c98eb437 | |||
| f5c629a6bc | |||
| 188afcd2aa | |||
| 2a241eb944 | |||
| 1a01b08343 | |||
| c90a76ec29 |
@@ -48,6 +48,14 @@ jobs:
|
||||
- name: Install Snapcraft
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
uses: samuelmeuli/action-snapcraft@v1
|
||||
- name: Install flatpak
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt install flatpak flatpak-builder --yes
|
||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install --user --assumeyes --runtime flathub org.freedesktop.Platform/x86_64/23.08
|
||||
flatpak install --user --assumeyes --runtime flathub org.freedesktop.Sdk/x86_64/23.08
|
||||
flatpak install --user --assumeyes --app flathub org.electronjs.Electron2.BaseApp/x86_64/23.08
|
||||
- name: Publish
|
||||
run: |
|
||||
yarn run build:app
|
||||
@@ -66,6 +74,13 @@ jobs:
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
|
||||
- name: Install flatpak
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
run: |
|
||||
yarn run build:app:flatpak
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish
|
||||
|
||||
- name: publishSnap
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
run: |
|
||||
@@ -89,10 +104,12 @@ jobs:
|
||||
|
||||
mv app/dist/*.exe artifacts/ || true
|
||||
mv app/dist/*.zip artifacts/ || true
|
||||
mv app/dist/*.tar.gz artifacts/ || true
|
||||
mv app/dist/*.AppImage artifacts/ || true
|
||||
mv app/dist/*.deb artifacts/ || true
|
||||
mv app/dist/*.snap artifacts/ || true
|
||||
mv app/dist/*.dmg artifacts/ || true
|
||||
mv app/dist/*.flatpak artifacts/ || true
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
|
||||
+8
-2
@@ -48,7 +48,8 @@
|
||||
"armv7l",
|
||||
"arm64"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tar.gz"
|
||||
],
|
||||
"icon": "icons/",
|
||||
"category": "Development",
|
||||
@@ -70,6 +71,11 @@
|
||||
"ELECTRON_SNAP": "true"
|
||||
}
|
||||
},
|
||||
"flatpak": {
|
||||
"license": "LICENSE",
|
||||
"runtimeVersion": "23.08",
|
||||
"baseVersion": "23.08"
|
||||
},
|
||||
"win": {
|
||||
"target": [
|
||||
{
|
||||
@@ -103,7 +109,7 @@
|
||||
"scripts": {
|
||||
"start": "cross-env ELECTRON_START_URL=http://localhost:5001 DEVMODE=1 electron .",
|
||||
"start:local": "cross-env electron .",
|
||||
"dist": "electron-builder",
|
||||
"dist": "cross-env DEBUG=@malept/flatpak-bundler electron-builder",
|
||||
"build": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn dist",
|
||||
"build:local": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn predist",
|
||||
"postinstall": "yarn rebuild && patch-package",
|
||||
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"version": "5.2.8-beta.17",
|
||||
"version": "5.2.8-beta.21",
|
||||
"name": "dbgate-all",
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
@@ -31,6 +31,7 @@
|
||||
"build:tools": "yarn workspace dbgate-tools build",
|
||||
"build:lib": "yarn build:sqltree && yarn build:tools && yarn build:filterparser && yarn build:datalib",
|
||||
"build:app": "yarn plugins:copydist && cd app && yarn install && yarn build",
|
||||
"build:app:flatpak": "node setBuildFlatpak && cd app && yarn dist",
|
||||
"build:api": "yarn workspace dbgate-api build",
|
||||
"build:web:docker": "yarn workspace dbgate-web build",
|
||||
"build:plugins:frontend": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn build:frontend",
|
||||
|
||||
@@ -2,6 +2,10 @@ import type { DatabaseInfo, TableInfo, ApplicationDefinition, ViewInfo, Collecti
|
||||
import _flatten from 'lodash/flatten';
|
||||
|
||||
export function addTableDependencies(db: DatabaseInfo): DatabaseInfo {
|
||||
if (!db.tables) {
|
||||
return db;
|
||||
}
|
||||
|
||||
const allForeignKeys = _flatten(db.tables.map(x => x.foreignKeys || []));
|
||||
return {
|
||||
...db,
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
} from '../stores';
|
||||
import _, { Dictionary } from 'lodash';
|
||||
import { apiCall } from '../utility/api';
|
||||
import { showSnackbarSuccess } from '../utility/snackbar';
|
||||
import { showSnackbarError, showSnackbarSuccess } from '../utility/snackbar';
|
||||
import { changeTab } from '../utility/common';
|
||||
import getConnectionLabel from '../utility/getConnectionLabel';
|
||||
import { onMount } from 'svelte';
|
||||
@@ -47,6 +47,9 @@
|
||||
}
|
||||
);
|
||||
|
||||
// $: console.log('ConnectionTab.$values', $values);
|
||||
// $: console.log('ConnectionTab.driver', driver);
|
||||
|
||||
$: engine = $values.engine;
|
||||
$: driver = $extensions.drivers.find(x => x.engine == engine);
|
||||
|
||||
@@ -161,7 +164,12 @@
|
||||
|
||||
onMount(async () => {
|
||||
if (conid) {
|
||||
$values = await apiCall('connections/get', { conid });
|
||||
const con = await apiCall('connections/get', { conid });
|
||||
if (con) {
|
||||
$values = con;
|
||||
} else {
|
||||
showSnackbarError(`Connection not found: ${conid}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
const fs = require('fs');
|
||||
|
||||
const packageJson = fs.readFileSync('app/package.json', { encoding: 'utf-8' });
|
||||
const json = JSON.parse(packageJson);
|
||||
|
||||
json.build.linux.target = ['flatpak'];
|
||||
json.build.appId = 'org.dbgate.DbGate';
|
||||
|
||||
fs.writeFileSync('app/package.json', JSON.stringify(json, undefined, 2));
|
||||
Reference in New Issue
Block a user