MM-36448: Removes legacy CLI commands. (#17995)
* MM-36448: Removes legacy CLI commands. * MM-26448: Update translations. * MM-36448: Fixes some lint errors. * MM-36448: Conflict resolution error fix. Lint fixes. * MM-36448: Removes some more commands. * MM-36448: Removes unused functions. * MM-36448: Re-adds config command. * MM-36448: Re-adds func for use by config. * MM-36448: Moved structs back. * MM-36488: Re-adds version. * MM-36448: Re-added some commands. * MM-36448: Fix tests. * MM-36448: Removed unused func. * MM-36448: Removes test. * MM-36448: Removes uses of 'config set'. * MM-36448: Moves some test structs. * MM-36448: Removes the logs command. * MM-36448: Re-deleted file after bad merge. * MM-36448: Deleted test files again. * MM-36448: Re-delete files. Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2560469bc7
Коммит
8f01a1b5a1
@@ -1,12 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
jq_cmd=jq
|
||||
[[ $(type -P "$jq_cmd") ]] || {
|
||||
echo "'$jq_cmd' command line JSON processor not found";
|
||||
echo "Please install on linux with 'sudo apt-get install jq'"
|
||||
echo "Please install on mac with 'brew install jq'"
|
||||
exit 1;
|
||||
}
|
||||
./jq-dep-check.sh
|
||||
|
||||
if [ -z "$FROM" ]
|
||||
then
|
||||
|
||||
9
scripts/jq-dep-check.sh
Исполняемый файл
9
scripts/jq-dep-check.sh
Исполняемый файл
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
jq_cmd=jq
|
||||
[[ $(type -P "$jq_cmd") ]] || {
|
||||
echo "'$jq_cmd' command line JSON processor not found";
|
||||
echo "Please install on linux with 'sudo apt-get install jq'"
|
||||
echo "Please install on mac with 'brew install jq'"
|
||||
exit 1;
|
||||
}
|
||||
@@ -1,12 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
jq_cmd=jq
|
||||
[[ $(type -P "$jq_cmd") ]] || {
|
||||
echo "'$jq_cmd' command line JSON processor not found";
|
||||
echo "Please install on linux with 'sudo apt-get install jq'"
|
||||
echo "Please install on mac with 'brew install jq'"
|
||||
exit 1;
|
||||
}
|
||||
./jq-dep-check.sh
|
||||
|
||||
ldapsearch_cmd=ldapsearch
|
||||
[[ $(type -P "$ldapsearch_cmd") ]] || {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
./scripts/jq-dep-check.sh
|
||||
|
||||
TMPDIR=`mktemp -d 2>/dev/null || mktemp -d -t 'tmpConfigDir'`
|
||||
DUMPDIR=`mktemp -d 2>/dev/null || mktemp -d -t 'dumpDir'`
|
||||
|
||||
@@ -10,14 +12,16 @@ echo "Importing mysql dump from version 5.0"
|
||||
docker exec -i mattermost-mysql mysql -D migrated -uroot -pmostest < $(pwd)/scripts/mattermost-mysql-5.0.sql
|
||||
|
||||
echo "Setting up config for db migration"
|
||||
make ARGS="config set SqlSettings.DataSource 'mmuser:mostest@tcp(localhost:3306)/migrated?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' --config $TMPDIR/config.json" run-cli
|
||||
make ARGS="config set SqlSettings.DriverName 'mysql' --config $TMPDIR/config.json" run-cli
|
||||
cat $TMPDIR/config.json | \
|
||||
jq '.SqlSettings.DataSource = "mmuser:mostest@tcp(localhost:3306)/migrated?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s"' | \
|
||||
jq '.SqlSettings.DriverName = "mysql"' > $TMPDIR/config.json
|
||||
|
||||
echo "Running the migration"
|
||||
make ARGS="version --config $TMPDIR/config.json" run-cli
|
||||
|
||||
echo "Setting up config for fresh db setup"
|
||||
make ARGS="config set SqlSettings.DataSource 'mmuser:mostest@tcp(localhost:3306)/latest?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' --config $TMPDIR/config.json" run-cli
|
||||
cat $TMPDIR/config.json | \
|
||||
jq '.SqlSettings.DataSource = "mmuser:mostest@tcp(localhost:3306)/latest?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s"' > $TMPDIR/config.json
|
||||
|
||||
echo "Setting up fresh db"
|
||||
make ARGS="version --config $TMPDIR/config.json" run-cli
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
./scripts/jq-dep-check.sh
|
||||
|
||||
TMPDIR=`mktemp -d 2>/dev/null || mktemp -d -t 'tmpConfigDir'`
|
||||
DUMPDIR=`mktemp -d 2>/dev/null || mktemp -d -t 'dumpDir'`
|
||||
|
||||
@@ -10,14 +12,16 @@ echo "Importing postgres dump from version 5.0"
|
||||
docker exec -i mattermost-postgres psql -U mmuser -d migrated < $(pwd)/scripts/mattermost-postgresql-5.0.sql
|
||||
|
||||
echo "Setting up config for db migration"
|
||||
make ARGS="config set SqlSettings.DataSource 'postgres://mmuser:mostest@localhost:5432/migrated?sslmode=disable&connect_timeout=10' --config $TMPDIR/config.json" run-cli
|
||||
make ARGS="config set SqlSettings.DriverName 'postgres' --config $TMPDIR/config.json" run-cli
|
||||
cat $TMPDIR/config.json | \
|
||||
jq '.SqlSettings.DataSource = "postgres://mmuser:mostest@localhost:5432/migrated?sslmode=disable&connect_timeout=10"'| \
|
||||
jq '.SqlSettings.DriverName = "postgres"' > $TMPDIR/config.json
|
||||
|
||||
echo "Running the migration"
|
||||
make ARGS="version --config $TMPDIR/config.json" run-cli
|
||||
|
||||
echo "Setting up config for fresh db setup"
|
||||
make ARGS="config set SqlSettings.DataSource 'postgres://mmuser:mostest@localhost:5432/latest?sslmode=disable&connect_timeout=10' --config $TMPDIR/config.json" run-cli
|
||||
cat $TMPDIR/config.json | \
|
||||
jq '.SqlSettings.DataSource = "postgres://mmuser:mostest@localhost:5432/latest?sslmode=disable&connect_timeout=10"' > $TMPDIR/config.json
|
||||
|
||||
echo "Setting up fresh db"
|
||||
make ARGS="version --config $TMPDIR/config.json" run-cli
|
||||
|
||||
Ссылка в новой задаче
Block a user