-
Notifications
You must be signed in to change notification settings - Fork 973
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3f1c05
commit b8e8629
Showing
6 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
DATE=$(date +%Y-%m-%d:%H:%M:%S) | ||
VERSION="$(basename "${DIR}")" | ||
|
||
countly stop | ||
if [ -f "$DIR/upgrade_fs.sh" ]; then | ||
bash "$DIR/upgrade_fs.sh" combined 2>&1 | tee -a "$DIR/../../../log/countly-upgrade-fs-$VERSION-$DATE.log" | ||
fi | ||
if [ -f "$DIR/upgrade_db.sh" ]; then | ||
bash "$DIR/upgrade_db.sh" combined 2>&1 | tee -a "$DIR/../../../log/countly-upgrade-db-$VERSION-$DATE.log" | ||
fi | ||
countly upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
VER="24.10" | ||
|
||
CONTINUE="$(countly check before upgrade db "$VER")" | ||
|
||
if [ "$CONTINUE" != "1" ] && [ "$1" != "combined" ] | ||
then | ||
echo "Database is already up to date with $VER" | ||
read -r -p "Are you sure you want to run this script? [y/N] " response | ||
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]] | ||
then | ||
CONTINUE=1 | ||
fi | ||
fi | ||
|
||
if [ "$CONTINUE" == "1" ] | ||
then | ||
echo "Running database modifications" | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )" | ||
SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
if [ "$1" != "combined" ]; then | ||
#upgrade plugins | ||
nodejs "$DIR/scripts/install_plugins.js" | ||
fi | ||
|
||
#add indexes | ||
nodejs "$DIR/scripts/add_indexes.js" | ||
|
||
#run upgrade scripts | ||
nodejs "$SCRIPTS/scripts/merge_events_collections.js" | ||
|
||
|
||
if [ "$1" != "combined" ]; then | ||
countly upgrade; | ||
fi | ||
|
||
#call after check | ||
countly check after upgrade db "$VER" | ||
elif [ "$CONTINUE" == "0" ] | ||
then | ||
echo "Database is already upgraded to $VER" | ||
elif [ "$CONTINUE" == "-1" ] | ||
then | ||
echo "Database is upgraded to higher version" | ||
else | ||
echo "Unknown ugprade state: $CONTINUE" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
echo "Running filesystem modifications" | ||
|
||
VER="24.10" | ||
|
||
CONTINUE="$(countly check before upgrade fs "$VER")" | ||
|
||
if [ "$CONTINUE" != "1" ] && [ "$1" != "combined" ] | ||
then | ||
echo "Filesystem is already up to date with $VER" | ||
read -r -p "Are you sure you want to run this script? [y/N] " response | ||
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]] | ||
then | ||
CONTINUE=1 | ||
fi | ||
fi | ||
|
||
if [ "$CONTINUE" == "1" ] | ||
then | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )" | ||
|
||
#enable command line | ||
bash "$DIR/scripts/detect.init.sh" | ||
|
||
#upgrade plugins | ||
nodejs "$DIR/scripts/install_plugins.js" | ||
|
||
#get web sdk | ||
countly update sdk-web | ||
|
||
|
||
if [ "$1" != "combined" ]; then | ||
countly upgrade; | ||
else | ||
countly task dist-all; | ||
fi | ||
|
||
#call after check | ||
countly check after upgrade fs "$VER" | ||
elif [ "$CONTINUE" == "0" ] | ||
then | ||
echo "Filesystem is already upgraded to $VER" | ||
elif [ "$CONTINUE" == "-1" ] | ||
then | ||
echo "Filesystem is upgraded to higher version" | ||
else | ||
echo "Unknown ugprade state: $CONTINUE" | ||
fi |