Skip to content

Commit b8a6d6d

Browse files
author
Artem
committed
add last changes\fixes from recording branch
1 parent b51ac13 commit b8a6d6d

File tree

9 files changed

+28
-11
lines changed

9 files changed

+28
-11
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ jobs:
497497
root: .
498498
paths:
499499
- release/RedisInsight*.deb
500-
- release/RedisInsight*.AppImage
501500
- release/RedisInsight*.rpm
501+
- release/RedisInsight*.AppImage
502502
- release/*-linux.yml
503503
- release/redisstack
504504
macosx:

.circleci/redisstack/app-image.repack.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
ARCH=${ARCH:-x64}
44
WORKING_DIRECTORY=$(pwd)
55
SOURCE_APP=${SOURCE_APP:-"RedisInsight-preview-linux.AppImage"}
6+
APP_FOLDER_NAME="RedisInsight-preview-linux"
67
TAR_NAME="RedisInsight-preview-app-linux.$ARCH.tar.gz"
78
TMP_FOLDER="/tmp/RedisInsight-app-$ARCH"
89

@@ -15,8 +16,9 @@ cp "./release/$SOURCE_APP" "$TMP_FOLDER"
1516
cd "$TMP_FOLDER" || exit 1
1617

1718
./"$SOURCE_APP" --appimage-extract
18-
cd squashfs-root || exit 1
19+
mv squashfs-root "$APP_FOLDER_NAME"
20+
21+
tar -czvf "$TAR_NAME" "$APP_FOLDER_NAME"
1922

20-
tar -czvf "$TAR_NAME" ./*
2123
cp "$TAR_NAME" "$WORKING_DIRECTORY/release/redisstack/"
2224
cd "$WORKING_DIRECTORY" || exit 1

.circleci/redisstack/build_modules.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ cp redisinsight/api/.yarnclean.prod redisinsight/api/.yarnclean
1919
yarn --cwd ./redisinsight/api autoclean --force
2020

2121
rm -rf redisinsight/build.zip
22+
23+
cp LICENSE ./redisinsight
24+
2225
cd redisinsight && tar -czvf build.tar.gz \
2326
api/node_modules \
2427
api/dist \
2528
ui/dist \
29+
LICENSE \
2630
&& cd ..
2731

2832
mkdir -p release/redisstack

.circleci/redisstack/dmg.repack.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
ARCH=${ARCH:-x64}
44
WORKING_DIRECTORY=$(pwd)
55
TAR_NAME="RedisInsight-preview-app-darwin.$ARCH.tar.gz"
6-
TMP_FOLDER="/tmp/RedisInsight-app-$ARCH"
6+
APP_FOLDER_NAME="RedisInsight-preview.app"
7+
TMP_FOLDER="/tmp/$APP_FOLDER_NAME"
78

89
rm -rf "$TMP_FOLDER"
910

1011
mkdir -p "$WORKING_DIRECTORY/release/redisstack"
1112
mkdir -p "$TMP_FOLDER"
1213

1314
hdiutil attach "./release/RedisInsight-preview-mac-$ARCH.dmg"
14-
cp -r /Volumes/RedisInsight-*/RedisInsight-preview.app/* "$TMP_FOLDER"
15-
cd "$TMP_FOLDER" || exit 1
16-
tar -czvf "$TAR_NAME" ./*
15+
cp -a /Volumes/RedisInsight-*/RedisInsight-preview.app "/tmp"
16+
cd "/tmp" || exit 1
17+
tar -czvf "$TAR_NAME" "$APP_FOLDER_NAME"
1718
cp "$TAR_NAME" "$WORKING_DIRECTORY/release/redisstack/"
1819
cd "$WORKING_DIRECTORY" || exit 1
1920
hdiutil unmount /Volumes/RedisInsight-*/

electron-builder.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
},
9595
{
9696
"from": "./resources/app",
97-
"to": "../app",
97+
"to": "./app",
9898
"filter": ["**/*"]
9999
}
100100
]

redisinsight/api/config/production.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { join } from 'path';
2+
import * as os from 'os';
23

3-
const homedir = join(require('os').homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-preview');
4+
const homedir = process.env.APP_FOLDER_ABSOLUTE_PATH
5+
|| (join(os.homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-preview'));
46

57
export default {
68
dir_path: {

redisinsight/api/config/staging.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { join } from 'path';
2+
import * as os from 'os';
23

3-
const homedir = join(require('os').homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-v2.0-stage');
4+
const homedir = process.env.APP_FOLDER_ABSOLUTE_PATH
5+
|| (join(os.homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-v2.0-stage'));
46

57
export default {
68
dir_path: {

redisinsight/api/src/modules/shared/services/instances-business/auto-discovery.service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ export class AutoDiscoveryService implements OnModuleInit {
3434
return;
3535
}
3636

37+
// additional check for existing databases
38+
// We should not start auto discover if any database already exists
39+
if ((await this.databaseProvider.getAll()).length) {
40+
return;
41+
}
42+
3743
const settings = await this.settingsService.getSettings();
3844
// check agreements to understand if it is first launch
3945
if (!settings.agreements) {

redisinsight/main.dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const launchApiServer = async () => {
102102
const detectPortConst = await detectPort(port);
103103
process.env.API_PORT = detectPortConst?.toString();
104104
log.info('Available port:', detectPortConst);
105-
server();
105+
await server();
106106
} catch (error) {
107107
log.error('Catch server error:', error);
108108
}

0 commit comments

Comments
 (0)