Revert "Allow to auto-bump the version and show version in title (#2307)" (#2723)

This reverts commit 1583fdc4cb.
This commit is contained in:
Franck TROUILLEZ 2024-06-30 13:11:01 +02:00 committed by GitHub
parent 1583fdc4cb
commit 53ef64f61b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 1 additions and 75 deletions

View File

@ -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"]

View File

@ -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'

View File

@ -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}')

View File

@ -1,3 +0,0 @@
#!/bin/sh -l
python /action/workspace/bump-version.py

View File

@ -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

View File

@ -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` 2. Run `npm run start:dev` to locally run the project in `localhost:8000`
#### Linting #### 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. 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.
### ❔ FAQ ### ❔ FAQ

View File

@ -15,7 +15,6 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
private eventDisplay: TimedEventDisplay; private eventDisplay: TimedEventDisplay;
private titleStatsTimer: NodeJS.Timeout; private titleStatsTimer: NodeJS.Timeout;
private versionLabel: Phaser.GameObjects.Text;
constructor(scene: BattleScene, mode: Mode = Mode.TITLE) { constructor(scene: BattleScene, mode: Mode = Mode.TITLE) {
super(scene, mode); super(scene, mode);
@ -41,9 +40,6 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
this.titleContainer.add(this.eventDisplay); 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 = 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.playerCountLabel.setOrigin(1, 0);
this.titleContainer.add(this.playerCountLabel); this.titleContainer.add(this.playerCountLabel);