diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 586b75ad..a247bb71 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,12 +36,6 @@ jobs: - extract-version steps: - uses: actions/checkout@v2 - - name: 'Replace environment tokens' - uses: cschleiden/replace-tokens@v1 - with: - files: '["**/environment.prod.ts"]' - env: - TOKEN_APPLICATION_VERSION: "${{ needs.extract-version.outputs.turnierplan_version }}" - name: Login to container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: diff --git a/docker/README.md b/docker/README.md index 078489c2..a4fed112 100644 --- a/docker/README.md +++ b/docker/README.md @@ -6,11 +6,8 @@ Currently, there exists one Dockerfile with the `dotnet/aspnet:10.0-alpine` base docker build -t turnierplan:dev -f docker/turnierplan-amd64/Dockerfile . ``` -The resulting container image can be run as described in the [main readme](../README.md). The following minimal example uses an in-memory data store and does not mount any volumes: +The resulting container image can be run as described in the [installation guide](https://docs.turnierplan.net/installation/#container-image). The following minimal example uses an in-memory data store and does not mount any volumes: ```shell docker run -p 80:8080 -e Turnierplan__ApplicationUrl="http://localhost" -e Database__InMemory="true" turnierplan:dev ``` - -> [!WARNING] -> Manually built container images should not be used in production! This is because the relevant GitHub workflow performs other important steps before actually building the images. diff --git a/docs/pages/installation/index.md b/docs/pages/installation/index.md index 8922ea5c..98950d90 100644 --- a/docs/pages/installation/index.md +++ b/docs/pages/installation/index.md @@ -29,7 +29,7 @@ Für die Installation auf einem lokalen Rechner oder einer VM kann im einfachste ```yaml services: turnierplan.database: - image: postgres:latest + image: postgres:18 environment: - POSTGRES_PASSWORD=P@ssw0rd - POSTGRES_DB=turnierplan @@ -40,7 +40,7 @@ services: restart: unless-stopped turnierplan.application: - image: ghcr.io/turnierplan-net/turnierplan:latest + image: ghcr.io/turnierplan-net/turnierplan:2026.2.0 depends_on: - turnierplan.database environment: @@ -62,8 +62,6 @@ networks: turnierplan: ``` -Statt dem `latest`-Tag sollte immer eine spezifische Version für die Images der Datenbank und von turnierplan.NET verwendet werden. Dies ermöglicht eine bessere Kontrolle, welche Updates wann eingespielt werden. Die neuste Version ist auf der [Release-Seite](https://github.com/turnierplan-NET/turnierplan.NET/releases) der Repository auffindbar. - Die URL, welche letztendlich für den Zugriff auf turnierplan.NET verwendet wird, sollte in der Umgebungsvariable `Turnierplan__ApplicationUrl` spezifiziert werden. Falls bspw. eine Domain `example.com` verwendet wird, sollte der Wert der Umgebungsvariable `https://example.com` sein. Falls turnierplan.NET im lokalen Netzwerk gehostet wird, könnte der Wert bspw. `http://192.168.0.187` sein. Es muss natürlich das korrekte Protokoll (HTTP vs. HTTPS) verwendet werden. Die Volume-Mounts sind im [nachfolgenden Abschnitt](#volume-mounts) näher beschrieben. Je nach Konfiguration kann das Volume-Mount vom turnierlpan.NET-Container auch überflüssig sein. diff --git a/misc/bump-version.sh b/misc/bump-version.sh new file mode 100644 index 00000000..75ef8a77 --- /dev/null +++ b/misc/bump-version.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# +# Bumps the turnierplan.NET version in all relevant files for the next release. +# +# Usage: +# ./bump-version.sh +# + +if (( $# != 1 )); then + echo "Usage: $0 " + exit 1 +fi + +# The 'version.xml' file is considered leading +current_version=$(grep -Po '\d+\.\d+\.\d+' ../src/version.xml) + +next_version="$1" +if [[ ! $next_version =~ ^20[2-9][0-9]+\.[1-9][0-9]*\.[0-9]+$ ]]; then + echo "Error: The specified new version '$1' is not a valid version." + exit 1 +fi + +if [[ $current_version == $next_version ]]; then + echo "Error: The current version is already '$1'." + exit 1 +fi + +echo "Bumping version: '$current_version' -> '$next_version'" + +update_file () { + echo "Updating file: $1" + sed -i -e "s/${current_version//./\\.}/$next_version/g" "../$1" +} + +update_file "src/version.xml" +update_file "src/Turnierplan.App/Client/package.json" +update_file "src/Turnierplan.App/Client/src/environments/environment.prod.ts" +update_file "docs/pages/installation/index.md" diff --git a/src/Turnierplan.App/Client/package.json b/src/Turnierplan.App/Client/package.json index 2ab1fd9a..909a2ecf 100644 --- a/src/Turnierplan.App/Client/package.json +++ b/src/Turnierplan.App/Client/package.json @@ -1,6 +1,6 @@ { "name": "turnierplan-net", - "version": "0.0.0", + "version": "2026.2.0", "description": "The client application of turnierplan.NET", "private": true, "license": "AGPL-3.0-only", diff --git a/src/Turnierplan.App/Client/src/environments/environment.prod.ts b/src/Turnierplan.App/Client/src/environments/environment.prod.ts index a1820106..b23489f5 100644 --- a/src/Turnierplan.App/Client/src/environments/environment.prod.ts +++ b/src/Turnierplan.App/Client/src/environments/environment.prod.ts @@ -1,7 +1,7 @@ export const environment = { production: true, defaultTitle: 'turnierplan.NET', - version: '#{TOKEN_APPLICATION_VERSION}#', + version: '2026.2.0', originOverwrite: undefined, includeE2EData: false, doUpdatesCheck: true