From 53ef64f61bb65d6631afec0d283f3578f4a4989f Mon Sep 17 00:00:00 2001 From: Franck TROUILLEZ <57403591+francktrouillez@users.noreply.github.com> Date: Sun, 30 Jun 2024 13:11:01 +0200 Subject: [PATCH] Revert "Allow to auto-bump the version and show version in title (#2307)" (#2723) This reverts commit 1583fdc4cb7ac8d5e2bde8bb99a461b0f3e88469. --- .github/actions/bump-version/Dockerfile | 9 ------- .github/actions/bump-version/action.yml | 6 ----- .github/actions/bump-version/bump-version.py | 27 -------------------- .github/actions/bump-version/entrypoint.sh | 3 --- .github/workflows/bump-version.yml | 22 ---------------- README.md | 5 +--- src/ui/title-ui-handler.ts | 4 --- 7 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 .github/actions/bump-version/Dockerfile delete mode 100644 .github/actions/bump-version/action.yml delete mode 100644 .github/actions/bump-version/bump-version.py delete mode 100755 .github/actions/bump-version/entrypoint.sh delete mode 100644 .github/workflows/bump-version.yml diff --git a/.github/actions/bump-version/Dockerfile b/.github/actions/bump-version/Dockerfile deleted file mode 100644 index 22207213c56..00000000000 --- a/.github/actions/bump-version/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM python:3.12-slim - -# Set the working directory -WORKDIR /action/workspace - -# Copy the script into the container -COPY . /action/workspace/ - -ENTRYPOINT ["/action/workspace/entrypoint.sh"] diff --git a/.github/actions/bump-version/action.yml b/.github/actions/bump-version/action.yml deleted file mode 100644 index 8f9284cedbb..00000000000 --- a/.github/actions/bump-version/action.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: "Auto-Bump Version File" -author: "Franck Trouillez" -description: "Automatically bump the package.json and package-file.json file." -runs: - using: 'docker' - image: 'Dockerfile' diff --git a/.github/actions/bump-version/bump-version.py b/.github/actions/bump-version/bump-version.py deleted file mode 100644 index 09c7c522f0a..00000000000 --- a/.github/actions/bump-version/bump-version.py +++ /dev/null @@ -1,27 +0,0 @@ -import json - -# Read package.json -with open('package.json', 'r') as package_file: - package_data = json.load(package_file) - -# Read package-lock.json -with open('package-lock.json', 'r') as lock_file: - lock_data = json.load(lock_file) - -# Bump version -version = package_data['version'] -version_parts = version.split('.') -version_parts[-1] = str(int(version_parts[-1]) + 1) -new_version = '.'.join(version_parts) - -# Update package.json -package_data['version'] = new_version -with open('package.json', 'w') as package_file: - json.dump(package_data, package_file, indent=2) - -# Update package-lock.json -lock_data['version'] = new_version -with open('package-lock.json', 'w') as lock_file: - json.dump(lock_data, lock_file, indent=2) - -print(f'Version bumped to {new_version}') diff --git a/.github/actions/bump-version/entrypoint.sh b/.github/actions/bump-version/entrypoint.sh deleted file mode 100755 index 94a90a5ebe6..00000000000 --- a/.github/actions/bump-version/entrypoint.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -l - -python /action/workspace/bump-version.py diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml deleted file mode 100644 index 570d851c4e6..00000000000 --- a/.github/workflows/bump-version.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Bump version -on: - workflow_dispatch: - push: - branches: - - main - -jobs: - bump-version: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Bump version file - uses: ./.github/actions/bump-version - - name: Commit and push - run: | - git config --local user.email "auto-bump-version@github-actions.com" - git config --local user.name "Auto Bump Version Action" - git add . - git commit -m "[ABV] Bump version" - git push diff --git a/README.md b/README.md index 6f68ce786f9..d1b46e630bf 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,7 @@ If you have the motivation and experience with Typescript/Javascript (or are wil 2. Run `npm run start:dev` to locally run the project in `localhost:8000` #### Linting -We're using ESLint as our common linter and formatter. It will run automatically during the pre-commit hook but if you would like to manually run it, use the `npm run eslint` script. - -#### Version management -If you're making a bigger change, it is recommended to bump the minor version in the `package.json` file. If you're making an even bigger change, bump the major version. Patch versions are bumped automatically by the CI/CD pipeline. +We're using ESLint as our common linter and formatter. It will run automatically during the pre-commit hook but if you would like to manually run it, use the `npm run eslint` script. ### ❔ FAQ diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index fef200df960..4036e0b9922 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -15,7 +15,6 @@ export default class TitleUiHandler extends OptionSelectUiHandler { private eventDisplay: TimedEventDisplay; private titleStatsTimer: NodeJS.Timeout; - private versionLabel: Phaser.GameObjects.Text; constructor(scene: BattleScene, mode: Mode = Mode.TITLE) { super(scene, mode); @@ -41,9 +40,6 @@ export default class TitleUiHandler extends OptionSelectUiHandler { this.titleContainer.add(this.eventDisplay); } - this.versionLabel = addTextObject(this.scene, 0, 0, this.scene.game.config.gameVersion, TextStyle.MESSAGE, { fontSize: "54px" }); - this.titleContainer.add(this.versionLabel); - this.playerCountLabel = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 2, (this.scene.game.canvas.height / 6) - 109, `? ${i18next.t("menu:playersOnline")}`, TextStyle.MESSAGE, { fontSize: "54px" }); this.playerCountLabel.setOrigin(1, 0); this.titleContainer.add(this.playerCountLabel);