From d9c2d58c5a2492c1093294855ba8b11cdd6f1da4 Mon Sep 17 00:00:00 2001 From: Stephanie Kemna <6518317+StephanieKemna@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:22:35 +0100 Subject: [PATCH 1/3] add config for bump-my-version to pyproject.toml, update README to fix error in path --- README.md | 2 +- pyproject.toml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 67b8972..20ae149 100644 --- a/README.md +++ b/README.md @@ -320,7 +320,7 @@ Hee Jong Park - [@LinkedIn](https://www.linkedin.com/in/heejongpark/) - =1.0.0", "myst-parser>=4.0", "furo>=2024.8", + "bump-my-version>=0.29.0" ] native-tls = true @@ -159,3 +160,32 @@ reportUnnecessaryTypeIgnoreComment = "information" # reportConstantRedefinition = "warning" # reportImportCycles = "warning" # reportImplicitStringConcatenation = "warning" + + +[tool.bumpversion] +current_version = "1.0.2" +parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" +serialize = ["{major}.{minor}.{patch}"] +search = "{current_version}" +replace = "{new_version}" +regex = false +ignore_missing_version = false +tag = false +sign_tags = false +tag_name = "v{new_version}" +tag_message = "Bump version: {current_version} → {new_version}" +allow_dirty = false +commit = false +message = "Bump version: {current_version} → {new_version}" +commit_args = "" + +[[tool.bumpversion.files]] +filename = "docs/source/conf.py" + +[[tool.bumpversion.files]] +filename = "CHANGELOG.md" +search = "## Unreleased" +replace = "## [{new_version}]" + +[[tool.bumpversion.files]] +filename = "pyproject.toml" From 22102381e4e6f0c2d61a88886e2e98114e707e11 Mon Sep 17 00:00:00 2001 From: Stephanie Kemna <6518317+StephanieKemna@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:35:01 +0100 Subject: [PATCH 2/3] add GH action for bump-my-version --- .github/workflows/_bump-my-version.yml | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/_bump-my-version.yml diff --git a/.github/workflows/_bump-my-version.yml b/.github/workflows/_bump-my-version.yml new file mode 100644 index 0000000..bf96952 --- /dev/null +++ b/.github/workflows/_bump-my-version.yml @@ -0,0 +1,35 @@ +name: Bump version + +on: + workflow_dispatch: + inputs: + bump-type: + description: 'Bump type' + required: true + default: 'patch' + type: choice + options: + - major + - minor + - patch + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v4 + + - name: Bump version + id: bump + uses: callowayproject/bump-my-version@master + env: + BUMPVERSION_TAG: "true" + with: + args: ${{ inputs.bump-type }} + github-token: ${{ secrets.GH_TOKEN }} + + - name: Check + if: steps.bump.outputs.bumped == 'true' + run: | + echo "Version was bumped from ${{ steps.bump.outputs.previous-version }} to ${{ steps.bump.outputs.current-version }}!" From b7fd99dea9e43e9fdec524c66c412ec13c3ef190 Mon Sep 17 00:00:00 2001 From: Stephanie Kemna <6518317+StephanieKemna@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:42:03 +0100 Subject: [PATCH 3/3] update CHANGELOG and README given addition bump-my-version --- CHANGELOG.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b77136c..f6f8d35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e ### Changed +* Add bump-my-version for handling release versions/updating in different files. * Add README page for Examples dir, add generated FMUs for each example (given FMI tools page requirements for Examples), and update the files generated by mlfmu codegen (add for pyspark example) * Generation of modelDescription.xml file to correctly generate tags for each output with 1-indexed indexes and InitialUnknowns tags * Generation of modelDescription.xml adds the variables (inputs, parameters and outputs) in the orderer of their valueReference. This is for the indexing to work correctly diff --git a/README.md b/README.md index 20ae149..a59f6d8 100644 --- a/README.md +++ b/README.md @@ -320,7 +320,7 @@ Hee Jong Park - [@LinkedIn](https://www.linkedin.com/in/heejongpark/) -