Skip to content

Commit

Permalink
bundle cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeTWC1984 committed Mar 23, 2024
1 parent c0999d7 commit a1e2dd9
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions bundle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
cd "$(dirname "$0")"

usage() {
echo "Usage: $0 /path/to/dist"
echo "Usage: $0 [/path/to/dist]"
echo " [ --s3 | --lmdb | --level | --sftp | --sqlite | --mysql | --oracle | --mysql | --pgsql ] # bundle 1 or more storage engine"
echo " [ --dev ] # avoid minification, add verbosity to esbuild/npm"
echo " [ --versbose ] # add verbosity"
Expand Down Expand Up @@ -138,13 +138,12 @@ fi

# ----------------

mkdir -p $dist
mkdir -p $dist/bin
cp -r htdocs $dist/
cp -r bin $dist/
# cp -r bin $dist/
cp package.json $dist/bin/
rm $dist/bin/storage-migrate.js $dist/bin/run-detached.js


cp bin/manager bin/worker bin/cronicled.init bin/control.sh bin/getnode.sh $dist/bin/

# -------------------------------

writehead "Building frontend"
Expand Down Expand Up @@ -425,13 +424,10 @@ fi

cd - &>/dev/null

# ------ clean up
writehead "Final cleanup"
rm -rf $dist/bin/cronicled.init $dist/bin/debug.sh $dist/bin/install.js $dist/bin/build.js $dist/bin/build-tools.js \
$dist/bin/manager.bat $dist/bin/worker.bat $dist/bin/win-* $dist/bin/*.ps1
# ------ final steps
writehead "Setting up permissions"
chmod -R 755 $dist/bin


# -------------------- we are done

# if in dev mode, start cronicle on background in manager mode
Expand All @@ -448,16 +444,12 @@ echo ""
echo "---------------------------------------------------------------------------------------------------------------------------------------"
echo ""
echo "Bundle is ready: $(readlink -f $dist)"
if [ "$sql" = 1 ]; then
echo " - SQL Engine is bundled for mysql and postgress only. SQLite, MSSQL Oracle need to be installed separetly in $dist"
fi

if [ "$lmdb" = 1 ]; then
echo " - Lmdb cannot be fully bundeled. Lmdb package was installed in $dist"
fi
if [ "$level" = 1 ]; then
echo " - If not running this on linux, copy OS proper binary from node_modules/classic-level/prebuilds to $dist/bin/engines/prebuilds/"
echo " - Lmdb package was installed in $dist"
fi


if [ "$restart" = 1 ]; then
echo "Running in dev mode. Version: $CRONICLE_dev_version"
exit 0
Expand Down

0 comments on commit a1e2dd9

Please sign in to comment.