Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bump-my-version for managing updating release versions #91

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/_bump-my-version.yml
Original file line number Diff line number Diff line change
@@ -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 }}!"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Hee Jong Park - [@LinkedIn](https://www.linkedin.com/in/heejongpark/) - <hee.jon

For your contribution, please make sure you follow the [STYLEGUIDE](STYLEGUIDE.md) before creating the Pull Request.

Note; version numbers should be updated in: `CHANGELOG.md`, `pyproject.toml`, and `source/docs/conf.py`.
Note; version numbers are in: `CHANGELOG.md`, `pyproject.toml`, and `docs/source/conf.py` (and should be automatically updated by bump-my-version upon release).

## Errors & fixes

Expand Down
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ dev-dependencies = [
"sphinxcontrib-mermaid>=1.0.0",
"myst-parser>=4.0",
"furo>=2024.8",
"bump-my-version>=0.29.0"
]
native-tls = true

Expand Down Expand Up @@ -159,3 +160,32 @@ reportUnnecessaryTypeIgnoreComment = "information"
# reportConstantRedefinition = "warning"
# reportImportCycles = "warning"
# reportImplicitStringConcatenation = "warning"


[tool.bumpversion]
current_version = "1.0.2"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\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"
Loading