File tree Expand file tree Collapse file tree 10 files changed +86
-13
lines changed
src/modules/shared/services/instances-business Expand file tree Collapse file tree 10 files changed +86
-13
lines changed Original file line number Diff line number Diff line change @@ -478,6 +478,10 @@ jobs:
478
478
condition :
479
479
equal : [ true, << parameters.redisstack >> ]
480
480
steps :
481
+ - run :
482
+ name : Repack AppImage to tar
483
+ command : |
484
+ ARCH=x86_64 ./.circleci/redisstack/app-image.repack.sh
481
485
- run :
482
486
name : Build sources
483
487
command : ./.circleci/redisstack/build.sh
@@ -492,8 +496,8 @@ jobs:
492
496
root : .
493
497
paths :
494
498
- release/RedisInsight*.deb
495
- - release/RedisInsight*.AppImage
496
499
- release/RedisInsight*.rpm
500
+ - release/RedisInsight*.AppImage
497
501
- release/*-linux.yml
498
502
- release/redisstack
499
503
macosx :
@@ -540,13 +544,20 @@ jobs:
540
544
UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage
541
545
rm -rf release/mac
542
546
no_output_timeout : 15m
547
+
548
+ - run :
549
+ name : Repack dmg to tar
550
+ command : |
551
+ ARCH=x64 ./.circleci/redisstack/dmg.repack.sh
552
+ ARCH=arm64 ./.circleci/redisstack/dmg.repack.sh
543
553
- persist_to_workspace :
544
554
root : .
545
555
paths :
546
556
- release/RedisInsight*.zip
547
557
- release/RedisInsight*.dmg
548
558
- release/RedisInsight*.dmg.blockmap
549
559
- release/*-mac.yml
560
+ - release/redisstack
550
561
windows :
551
562
executor :
552
563
name : win/default
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ ARCH=${ARCH:- x86_64}
4
+ WORKING_DIRECTORY=$( pwd)
5
+ SOURCE_APP=${SOURCE_APP:- " RedisInsight-V2-linux-$ARCH .AppImage" }
6
+ APP_FOLDER_NAME=" RedisInsight-V2-linux"
7
+ TAR_NAME=" RedisInsight-V2-app-linux.$ARCH .tar.gz"
8
+ TMP_FOLDER=" /tmp/RedisInsight-app-$ARCH "
9
+
10
+ rm -rf " $TMP_FOLDER "
11
+
12
+ mkdir -p " $WORKING_DIRECTORY /release/redisstack"
13
+ mkdir -p " $TMP_FOLDER "
14
+
15
+ cp " ./release/$SOURCE_APP " " $TMP_FOLDER "
16
+ cd " $TMP_FOLDER " || exit 1
17
+
18
+ ./" $SOURCE_APP " --appimage-extract
19
+ mv squashfs-root " $APP_FOLDER_NAME "
20
+
21
+ tar -czvf " $TAR_NAME " " $APP_FOLDER_NAME "
22
+
23
+ cp " $TAR_NAME " " $WORKING_DIRECTORY /release/redisstack/"
24
+ cd " $WORKING_DIRECTORY " || exit 1
Original file line number Diff line number Diff line change 2
2
3
3
PLATFORM=${PLATFORM:- ' linux' }
4
4
ELECTRON_VERSION=$( cat electron/version)
5
- VERSION=${ELECTRON_VERSION:- ' redisstack' }
6
5
ARCH=${ARCH:- ' x64' }
7
- FILENAME=" RedisInsight-$PLATFORM .$VERSION .$ARCH .zip"
6
+ # FILENAME="RedisInsight-$PLATFORM.$VERSION.$ARCH.zip"
7
+ FILENAME=" RedisInsight-V2-web-$PLATFORM .$ARCH .tar.gz"
8
8
9
9
# reinstall backend prod dependencies only (optimise space)
10
10
rm -rf redisinsight/api/node_modules
@@ -13,19 +13,21 @@ npm_config_arch="$ARCH" \
13
13
npm_config_target_arch=" $ARCH " \
14
14
npm_config_platform=" $PLATFORM " \
15
15
npm_config_target_platform=" $PLATFORM " \
16
- npm_config_keytar_binary_host_mirror=" $KEYTAR_MIRROR " \
17
- npm_config_node_sqlite3_binary_host_mirror=" $SQLITE_MIRROR " \
18
16
yarn --cwd ./redisinsight/api install --production
19
17
20
18
cp redisinsight/api/.yarnclean.prod redisinsight/api/.yarnclean
21
19
yarn --cwd ./redisinsight/api autoclean --force
22
20
23
21
rm -rf redisinsight/build.zip
24
- cd redisinsight && zip -r build.zip \
22
+
23
+ cp LICENSE ./redisinsight
24
+
25
+ cd redisinsight && tar -czvf build.tar.gz \
25
26
api/node_modules \
26
27
api/dist \
27
28
ui/dist \
29
+ LICENSE \
28
30
&& cd ..
29
31
30
32
mkdir -p release/redisstack
31
- cp redisinsight/build.zip release/redisstack/" $FILENAME "
33
+ cp redisinsight/build.tar.gz release/redisstack/" $FILENAME "
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ ARCH=${ARCH:- x64}
4
+ WORKING_DIRECTORY=$( pwd)
5
+ TAR_NAME=" RedisInsight-V2-app-darwin.$ARCH .tar.gz"
6
+ APP_FOLDER_NAME=" RedisInsight-V2.app"
7
+ TMP_FOLDER=" /tmp/$APP_FOLDER_NAME "
8
+
9
+ rm -rf " $TMP_FOLDER "
10
+
11
+ mkdir -p " $WORKING_DIRECTORY /release/redisstack"
12
+ mkdir -p " $TMP_FOLDER "
13
+
14
+ hdiutil attach " ./release/RedisInsight-V2-mac-$ARCH .dmg"
15
+ cp -a /Volumes/RedisInsight-* /RedisInsight-V2.app " /tmp"
16
+ cd " /tmp" || exit 1
17
+ tar -czvf " $TAR_NAME " " $APP_FOLDER_NAME "
18
+ cp " $TAR_NAME " " $WORKING_DIRECTORY /release/redisstack/"
19
+ cd " $WORKING_DIRECTORY " || exit 1
20
+ hdiutil unmount /Volumes/RedisInsight-* /
Original file line number Diff line number Diff line change 15
15
"artifactName" : " ${productName}-${os}-${arch}.${ext}" ,
16
16
"compression" : " normal" ,
17
17
"mac" : {
18
- "artifactName" : " ${productName}-${os}-${arch}.${ext}" ,
19
18
"target" : [
20
19
{
21
20
"target" : " dmg" ,
22
21
"arch" : [" x64" , " arm64" ]
23
- },
24
- {
22
+ }, {
25
23
"target" : " zip" ,
26
24
"arch" : [" x64" , " arm64" ]
27
25
}
93
91
"from" : " ./redisinsight/api/defaults" ,
94
92
"to" : " defaults" ,
95
93
"filter" : [" **/*" ]
94
+ },
95
+ {
96
+ "from" : " ./resources/app" ,
97
+ "to" : " ./app" ,
98
+ "filter" : [" **/*" ]
96
99
}
97
100
]
98
101
}
Original file line number Diff line number Diff line change 1
1
import { join } from 'path' ;
2
+ import * as os from 'os' ;
2
3
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' ) ) ;
4
6
5
7
export default {
6
8
dir_path : {
Original file line number Diff line number Diff line change 1
1
import { join } from 'path' ;
2
+ import * as os from 'os' ;
2
3
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' ) ) ;
4
6
5
7
export default {
6
8
dir_path : {
Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ export class AutoDiscoveryService implements OnModuleInit {
34
34
return ;
35
35
}
36
36
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
+
37
43
const settings = await this . settingsService . getSettings ( ) ;
38
44
// check agreements to understand if it is first launch
39
45
if ( ! settings . agreements ) {
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ const launchApiServer = async () => {
102
102
const detectPortConst = await detectPort ( port ) ;
103
103
process . env . API_PORT = detectPortConst ?. toString ( ) ;
104
104
log . info ( 'Available port:' , detectPortConst ) ;
105
- server ( ) ;
105
+ await server ( ) ;
106
106
} catch ( error ) {
107
107
log . error ( 'Catch server error:' , error ) ;
108
108
}
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ open /Applications/RedisInsight-preview
You can’t perform that action at this time.
0 commit comments