-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathupdate-tc-custom-changes.sh
More file actions
48 lines (43 loc) · 1.82 KB
/
update-tc-custom-changes.sh
File metadata and controls
48 lines (43 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# stop if any error happen
set -e
# before install
git clone --branch=${BRANCH} https://github.com/TrinityCore/TrinityCoreCustomChanges.git server
cd server
git config user.email "github.actions@build.bot" && git config user.name "Github Actions"
git status
if [ -n "$BASE_BRANCH" ]; then
git remote add BaseRemote https://github.com/TrinityCore/TrinityCoreCustomChanges.git
else
git remote add BaseRemote https://github.com/TrinityCore/TrinityCore.git
export BASE_BRANCH=3.3.5
fi
git fetch BaseRemote ${BASE_BRANCH}
git merge -m "Merge ${BASE_BRANCH} to ${BRANCH}" BaseRemote/${BASE_BRANCH}
git submodule update --init --recursive
git status
# install
mysql -uroot -proot -e "SET PASSWORD FOR root@localhost='';"
mysql -uroot -e 'create database test_mysql;'
mkdir bin
cd bin
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install
cd ..
chmod +x contrib/check_updates.sh
# script
c++ --version
mysql -uroot < sql/create/create_mysql.sql
mysql -utrinity -ptrinity auth < sql/base/auth_database.sql
./contrib/check_updates.sh auth 3.3.5 auth localhost
mysql -utrinity -ptrinity characters < sql/base/characters_database.sql
./contrib/check_updates.sh characters 3.3.5 characters localhost
mysql -utrinity -ptrinity world < sql/base/dev/world_database.sql
cat sql/updates/world/3.3.5/*.sql | mysql -utrinity -ptrinity world
mysql -uroot < sql/create/drop_mysql_8.sql
cd bin
make -j 4 -k && make install
cd check_install/bin
./authserver --version
./worldserver --version
# after success
git push https://${GITHUB_TOKEN}@github.com/TrinityCore/TrinityCoreCustomChanges.git HEAD:${BRANCH}