Skip to content

Commit

Permalink
Merge pull request #40 from startersclan/chore/release-1.10.0
Browse files Browse the repository at this point in the history
Chore: Release 1.10.0
  • Loading branch information
leojonathanoh authored Nov 23, 2023
2 parents 085cd96 + e20e8a8 commit 683c762
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ a PHP frontend.
`web` image (See [./src/web/config.php](./src/web/config.php) for supported environment variables):

```sh
docker run --rm -it -e DB_ADDR=db -e DB_NAME=hlstatsxce -e DB_USER=hlstatsxce -e DB_PASS=hlstatsxce -p 80:80 startersclan/hlstatsx-community-edition:1.9.0-web
docker run --rm -it -e DB_ADDR=db -e DB_NAME=hlstatsxce -e DB_USER=hlstatsxce -e DB_PASS=hlstatsxce -p 80:80 startersclan/hlstatsx-community-edition:1.10.0-web
```

`daemon` image:

```sh
# Use --help for usage
docker run --rm -it -p 27500:27500/udp startersclan/hlstatsx-community-edition:1.9.0-daemon --db-host=db:3306 --db-name=hlstatsxce --db-username=hlstatsxce --db-password=hlstatsxce #--help
docker run --rm -it -p 27500:27500/udp startersclan/hlstatsx-community-edition:1.10.0-daemon --db-host=db:3306 --db-name=hlstatsxce --db-username=hlstatsxce --db-password=hlstatsxce #--help
```

### Docker Compose
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ services:
# 3. HLStatsX:CE perl daemon accepts the gameserver logs. Gameserver Logs are parsed and stats are recorded
# The daemon's proxy_key secret can only be setup in the HLStatsX:CE Web Admin Panel Settings under 'Proxy Settings' section
daemon:
image: startersclan/hlstatsx-community-edition:1.9.0-daemon
image: startersclan/hlstatsx-community-edition:1.10.0-daemon
ports:
- 27500:27500/udp # For external servers to send logs to the daemon
networks:
Expand All @@ -77,7 +77,7 @@ services:

# Cron - awards
awards:
image: startersclan/hlstatsx-community-edition:1.9.0-daemon
image: startersclan/hlstatsx-community-edition:1.10.0-daemon
stop_signal: SIGKILL
entrypoint:
- /bin/sh
Expand Down Expand Up @@ -124,7 +124,7 @@ services:
# Available at http://localhost:8081, or https://web.example.com
# Admin Panel username: admin, password: 123456
web:
image: startersclan/hlstatsx-community-edition:1.9.0-web
image: startersclan/hlstatsx-community-edition:1.10.0-web
labels:
- "traefik.enable=true"
- "traefik.docker.network=hlstatsx-community-edition_traefik-network"
Expand Down Expand Up @@ -158,7 +158,7 @@ services:

# Cron - Heatmaps
heatmaps:
image: startersclan/hlstatsx-community-edition:1.9.0-web
image: startersclan/hlstatsx-community-edition:1.10.0-web
volumes:
- games-volume:/web/hlstatsimg/games # Stateful games volume, which also contains heatmaps
environment:
Expand Down
10 changes: 5 additions & 5 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ fi
VERSION=$( echo "$TAG" | sed 's/^v//' )
VERSION_PREV=$( echo "$TAG_PREV" | sed 's/^v//' )
VERSION_PREV_REGEX=$( echo "$VERSION_PREV" | sed 's/\./\\./g' ) # '1.0.0' -> '1\.0\.0'
DBVERSION_PREV=$( ls web/updater | grep -E '^[0-9]+\.php$' | sort -n | tail -n1 | cut -d '.' -f1 )
DBVERSION_PREV=$( ls src/web/updater | grep -E '^[0-9]+\.php$' | sort -n | tail -n1 | cut -d '.' -f1 )
DBVERSION=$(( $DBVERSION_PREV + 1 ))

# Bump version in docs, .php, and .sql files
sed -i "s/$VERSION_PREV/$VERSION/" README.md
sed -i "s/$VERSION_PREV/$VERSION/" docker-compose.example.yml
sed -i "s/^SET @DBVERSION=.*/SET @DBVERSION=\"$DBVERSION\";/" sql/install.sql
sed -i "s/^SET @VERSION=.*/SET @VERSION=\"$VERSION\";/" sql/install.sql
echo "Creating web/updater/$DBVERSION.php"
cat - > web/updater/$DBVERSION.php <<EOF
sed -i "s/^SET @DBVERSION=.*/SET @DBVERSION=\"$DBVERSION\";/" src/sql/install.sql
sed -i "s/^SET @VERSION=.*/SET @VERSION=\"$VERSION\";/" src/sql/install.sql
echo "Creating src/web/updater/$DBVERSION.php"
cat - > src/web/updater/$DBVERSION.php <<EOF
<?php
if ( !defined('IN_UPDATER') )
{
Expand Down
4 changes: 2 additions & 2 deletions src/sql/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

-- This file is only needed for new installations.

SET @DBVERSION="82";
SET @VERSION="1.9.0";
SET @DBVERSION="83";
SET @VERSION="1.10.0";

-- --------------------------------------------------------

Expand Down
14 changes: 14 additions & 0 deletions src/web/updater/83.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
if ( !defined('IN_UPDATER') )
{
die('Do not access this file directly.');
}

$dbversion = 83;
$version = "1.10.0";

// Perform database schema update notification
print "Updating database and verion schema numbers.<br />";
$db->query("UPDATE hlstats_Options SET `value` = '$version' WHERE `keyname` = 'version'");
$db->query("UPDATE hlstats_Options SET `value` = '$dbversion' WHERE `keyname` = 'dbversion'");
?>

0 comments on commit 683c762

Please sign in to comment.