From 5d2d4f2694477b6a262ca6b0af836a9870b60cdb Mon Sep 17 00:00:00 2001 From: Houmgaor Date: Sun, 9 Nov 2025 13:03:46 +0100 Subject: [PATCH] chore: upgrade from Go 1.19 to Go 1.25. --- .github/workflows/go.yml | 2 +- CHANGELOG.md | 5 +++ README.md | 75 ++++++++++++++++++++++++++++++++++++---- go.mod | 2 +- go.sum | 1 + 5 files changed, 77 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c33872e81..6635e0a8a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.25 - name: Build Linux-amd64 run: env GOOS=linux GOARCH=amd64 go build -v diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f1b04e9e..f6e581286 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Upgraded Go version requirement from 1.19 to 1.25 +- Renamed `config.json` to `config.example.json` as template file + ## [9.2.0] - 2023-04-01 ### Added in 9.2.0 diff --git a/README.md b/README.md index f9acc06fb..4d84283c3 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,78 @@ If you want to modify or compile Erupe yourself, please read on. Install is simple, you need: -- [Go](https://go.dev/dl/): programming language for the server logic -- [PostgreSQL](https://www.postgresql.org/download/): server database. +- [Go 1.25+](https://go.dev/dl/): programming language for the server logic +- [PostgreSQL](https://www.postgresql.org/download/): server database ### Installation -1. Create a new database, and install the schema with the [backup file attached with the latest release](https://github.com/ZeruLight/Erupe/releases/latest/download/SCHEMA.sql). -2. Run each script under [patch-schema](./patch-schema) as they introduce newer schema. -3. Copy [config.example.json](./config.example.json) to `config.json`. Edit the new file so that the database password matches your PostgreSQL setup. -4. Launch `go run .` to run erupe directly, or use `go build` to compile Erupe. +#### First-time Setup + +1. Clone the repository: + + ```bash + git clone https://github.com/ZeruLight/Erupe.git + cd Erupe + ``` + +2. Create a new PostgreSQL database and install the schema: + + ```bash + # Download and apply the base schema + wget https://github.com/ZeruLight/Erupe/releases/latest/download/SCHEMA.sql + psql -U your_user -d your_database -f SCHEMA.sql + ``` + +3. Run each script under [patch-schema](./patch-schema) to apply schema updates: + + ```bash + psql -U your_user -d your_database -f patch-schema/01_patch.sql + # Repeat for each patch file in order + ``` + +4. Copy [config.example.json](./config.example.json) to `config.json` and edit it: + + ```bash + cp config.example.json config.json + # Edit config.json with your database credentials + ``` + +5. Install dependencies and run: + + ```bash + go mod download + go run . + ``` + + Or build a binary: + + ```bash + go build + ./erupe-ce + ``` + +#### Updating an Existing Installation + +1. Pull the latest changes: + + ```bash + git pull origin main + ``` + +2. Update dependencies: + + ```bash + go mod tidy + ``` + +3. Apply any new schema patches from [patch-schema](./patch-schema) + +4. Rebuild and restart: + + ```bash + go build + ./erupe-ce + ``` ### Note diff --git a/go.mod b/go.mod index 21ac00f07..7da2e0970 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module erupe-ce -go 1.19 +go 1.25 require ( github.com/bwmarrin/discordgo v0.23.2 diff --git a/go.sum b/go.sum index 863dc42a3..3c8e4d29e 100644 --- a/go.sum +++ b/go.sum @@ -494,6 +494,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=