From 5e61f43ce731222f9f14463345bc7c1071aa43dc Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Wed, 22 Nov 2023 05:13:08 +0000 Subject: [PATCH] Chore: Release 3.3.0 --- README.md | 2 +- docs/full-bf2-stack-example/docker-compose.yml | 4 ++-- src/ASP/index.php | 6 +++--- src/ASP/system/sql/data.sql | 1 + src/ASP/system/sql/migrations/down/30200.sql | 4 ++++ src/ASP/system/sql/migrations/migrations.php | 11 +++++++++-- src/ASP/system/sql/migrations/up/30300.sql | 4 ++++ 7 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 src/ASP/system/sql/migrations/down/30200.sql create mode 100644 src/ASP/system/sql/migrations/up/30300.sql diff --git a/README.md b/README.md index d15cc5e9..a5932e38 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The new BF2Statistics 3.0 ASP, currently in public Beta. The GameSpy server to m ## Usage (docker) ```sh -docker run --rm -it -p 80:80 -e DB_HOST=db -e DB_PORT=3306 -e DB_NAME=bf2stats -e DB_USER=root -e DB_PASS=ascent startersclan/asp:3.2.0 +docker run --rm -it -p 80:80 -e DB_HOST=db -e DB_PORT=3306 -e DB_NAME=bf2stats -e DB_USER=root -e DB_PASS=ascent startersclan/asp:3.3.0 ``` See [this](docs/full-bf2-stack-example) example showing how to deploy [Battlefield 2 1.5 server](https://github.com/startersclan/docker-bf2), [PRMasterserver](https://github.com/startersclan/PRMasterServer) as the master server, and `ASP` as the stats web server, using `docker-compose`. diff --git a/docs/full-bf2-stack-example/docker-compose.yml b/docs/full-bf2-stack-example/docker-compose.yml index 7f49730a..68c15c3d 100644 --- a/docs/full-bf2-stack-example/docker-compose.yml +++ b/docs/full-bf2-stack-example/docker-compose.yml @@ -2,7 +2,7 @@ version: '2.2' services: # Battlefield 2 1.5 server with bf2stats 3 python scripts bf2: - image: startersclan/docker-bf2:v1.5.3153.0-bf2stats-3.2.0 + image: startersclan/docker-bf2:v1.5.3153.0-bf2stats-3.3.0 volumes: - ./config/bf2/mods/bf2/ai/aidefault-custom.ai:/server/bf2/mods/bf2/ai/aidefault.ai:ro # Customize bots - ./config/bf2/mods/bf2/settings/serversettings-custom.con:/server/bf2/mods/bf2/settings/serversettings.con:ro # Server config @@ -125,7 +125,7 @@ services: # The gamespy ASP. The dashboard is available at https://asp.example.com/ASP asp: - image: startersclan/asp:3.2.0 + image: startersclan/asp:3.3.0 labels: - "traefik.enable=true" - "traefik.docker.network=${COMPOSE_PROJECT_NAME?err}_traefik-network" diff --git a/src/ASP/index.php b/src/ASP/index.php index a213e94d..720935aa 100644 --- a/src/ASP/index.php +++ b/src/ASP/index.php @@ -13,9 +13,9 @@ * linking of files, Also define ROOT and system paths */ define('BF2_ADMIN', true); -define('CODE_VERSION', '3.2.0'); -define('CODE_VERSION_DATE', '2021-4-21'); -define('DB_EXPECTED_VERSION', '3.2.0'); +define('CODE_VERSION', '3.3.0'); +define('CODE_VERSION_DATE', '2023-11-22'); +define('DB_EXPECTED_VERSION', '3.3.0'); define('DS', DIRECTORY_SEPARATOR); define('ROOT', __DIR__); define('SYSTEM_PATH', ROOT . DS . 'system'); diff --git a/src/ASP/system/sql/data.sql b/src/ASP/system/sql/data.sql index c01cbad7..317157b1 100644 --- a/src/ASP/system/sql/data.sql +++ b/src/ASP/system/sql/data.sql @@ -308,3 +308,4 @@ INSERT INTO `_version`(`updateid`, `version`) VALUES (30070, '3.0.7'); INSERT INTO `_version`(`updateid`, `version`) VALUES (30080, '3.0.8'); INSERT INTO `_version`(`updateid`, `version`) VALUES (30100, '3.1.0'); INSERT INTO `_version`(`updateid`, `version`) VALUES (30200, '3.2.0'); +INSERT INTO `_version`(`updateid`, `version`) VALUES (30300, '3.3.0'); diff --git a/src/ASP/system/sql/migrations/down/30200.sql b/src/ASP/system/sql/migrations/down/30200.sql new file mode 100644 index 00000000..18bd623f --- /dev/null +++ b/src/ASP/system/sql/migrations/down/30200.sql @@ -0,0 +1,4 @@ +-- +-- Always delete record from version table!!! +-- +DELETE FROM `_version` WHERE updateid = 30300; diff --git a/src/ASP/system/sql/migrations/migrations.php b/src/ASP/system/sql/migrations/migrations.php index 0b355740..99fe95f9 100644 --- a/src/ASP/system/sql/migrations/migrations.php +++ b/src/ASP/system/sql/migrations/migrations.php @@ -77,9 +77,16 @@ ], "3.2.0" => [ "comment" => "Added timestamp column to the player_unlock table.", - "up" => null, - "up_string" => "", + "up" => "30300", + "up_string" => "3.3.0", "down" => "30100", "down_string" => "3.1.0", + ], + "3.3.0" => [ + "comment" => "Add base game maps to data.sql; Fix Kubra Dam mapinfo redirect", + "up" => null, + "up_string" => "", + "down" => "30200", + "down_string" => "3.2.0", ] ]; diff --git a/src/ASP/system/sql/migrations/up/30300.sql b/src/ASP/system/sql/migrations/up/30300.sql new file mode 100644 index 00000000..d947e52b --- /dev/null +++ b/src/ASP/system/sql/migrations/up/30300.sql @@ -0,0 +1,4 @@ +-- +-- Always update version table!!! +-- +INSERT INTO `_version`(`updateid`, `version`) VALUES (30300, '3.3.0');