Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: callowayproject/bump-my-version
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.2
Choose a base ref
...
head repository: callowayproject/bump-my-version
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.1.0
Choose a head ref
  • 16 commits
  • 16 files changed
  • 4 contributors

Commits on Mar 8, 2025

  1. Fix caching in action

    coordt committed Mar 8, 2025
    Copy the full SHA
    d3b9f76 View commit details
  2. Merge pull request #315 from callowayproject/302-enable-pip-cache-for…

    …-github-action
    
    Fix caching in action
    coordt authored Mar 8, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    627af5b View commit details

Commits on Mar 17, 2025

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.0](astral-sh/ruff-pre-commit@v0.9.9...v0.11.0)
    pre-commit-ci[bot] authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a85b47f View commit details

Commits on Mar 18, 2025

  1. Added devenv.nix and justfile

    Addition of devenv.nix allows developers to easily create hermetic
    environments in order to develop this package. This greatly simplifies
    the setup of the environment, and utilizes uv's tooling to create the
    virtual environment(s). Devenv.nix can also handle git-hooks, but that
    is already handled via the .pre-commit-config.yaml file.
    
    The justfile includes some helpful starter recipes. Additional recipes
    can be added, such as build and publishing of the package/Docker.
    topher097 committed Mar 18, 2025
    Copy the full SHA
    653d917 View commit details
  2. Copy the full SHA
    f94cc27 View commit details
  3. Fixed the test_bump_nested_regex function to use utc time

    Code in the test function used the machine local time instead of UTC
    time. This made the test fail if the user was not in UTC time, as the
    fixture tested against a bumped time using `utcnow`
    
    Added a recipe to justfile to run the tests and open the coverage report
    in a default web browser
    topher097 committed Mar 18, 2025
    Copy the full SHA
    7d33dff View commit details

Commits on Mar 19, 2025

  1. Merge pull request #322 from topher097/devenv-nix

    Addition of devenv.nix and justfile and fix for test function
    coordt authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8b4d590 View commit details
  2. Merge pull request #324 from callowayproject/devenv-nix

    Add devenv.nix and just file
    coordt authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8085b0b View commit details
  3. Merge branch 'master' into pre-commit-ci-update-config

    coordt authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    65fce23 View commit details
  4. Merge pull request #316 from callowayproject/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    coordt authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f60d60b View commit details

Commits on Mar 21, 2025

  1. Refactor Mercurial SCM support and improve test coverage

    Revamped the Mercurial SCM implementation with new features including full tag retrieval, commit handling, and clean working directory assertion. Enhanced test suite with new Mercurial-specific tests for functionality and edge cases.
    coordt committed Mar 21, 2025
    Copy the full SHA
    acd94d1 View commit details

Commits on Mar 22, 2025

  1. Improved mercurial test coverage

    coordt committed Mar 22, 2025
    Copy the full SHA
    e35eee1 View commit details
  2. Fixed unit test !minor

    coordt committed Mar 22, 2025
    Copy the full SHA
    650d781 View commit details
  3. Fix subprocess warnings. !minor

    coordt committed Mar 22, 2025
    Copy the full SHA
    64da2d9 View commit details
  4. Merge pull request #325 from callowayproject/317-no-commit-on-mercuri…

    …al-repository
    
    Refactor Mercurial SCM support and improve test coverage
    coordt authored Mar 22, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9dc3e16 View commit details
  5. Version updated from 1.0.2 to 1.1.0

    Testing Git committed Mar 22, 2025
    Copy the full SHA
    65a9f4c View commit details
Showing with 718 additions and 198 deletions.
  1. +6 −0 .gitignore
  2. +1 −1 .pre-commit-config.yaml
  3. +43 −0 CHANGELOG.md
  4. +24 −16 CONTRIBUTING.md
  5. +2 −2 Dockerfile
  6. +4 −3 action.yml
  7. +1 −1 bumpversion/__init__.py
  8. +121 −20 bumpversion/scm/hg.py
  9. +1 −1 bumpversion/utils.py
  10. +62 −0 devenv.nix
  11. +9 −0 devenv.yaml
  12. +37 −0 justfile
  13. +10 −2 pyproject.toml
  14. +2 −4 tests/test_cli/test_bump.py
  15. +221 −9 tests/test_scm/test_hg.py
  16. +174 −139 uv.lock
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -163,6 +163,7 @@ flake8-errors.txt

RELEASE.txt
site-packages
test-reports
reports
*.env
todo.txt
@@ -171,3 +172,8 @@ temp.*
.python-version
requirements-dev.lock
requirements.lock

# Devenv files
.devenv/
devenv.lock
.devenv.flake.nix
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.9.9'
rev: 'v0.11.0'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## 1.1.0 (2025-03-22)
[Compare the full difference.](https://github.com/callowayproject/bump-my-version/compare/1.0.2...1.1.0)

### Fixes

- Refactor Mercurial SCM support and improve test coverage. [acd94d1](https://github.com/callowayproject/bump-my-version/commit/acd94d150b0bca2fbec354a50ae9b36bdb3cff75)

Revamped the Mercurial SCM implementation with new features including full tag retrieval, commit handling, and clean working directory assertion. Enhanced test suite with new Mercurial-specific tests for functionality and edge cases.
- Fixed the test_bump_nested_regex function to use utc time. [7d33dff](https://github.com/callowayproject/bump-my-version/commit/7d33dffaf38e7816202ddff3e9a9cc6a66b57fcb)

Code in the test function used the machine local time instead of UTC
time. This made the test fail if the user was not in UTC time, as the
fixture tested against a bumped time using `utcnow`

Added a recipe to justfile to run the tests and open the coverage report
in a default web browser
- Fix caching in action. [d3b9f76](https://github.com/callowayproject/bump-my-version/commit/d3b9f76d2422b6b2da16c3a4d08b2c572758740a)

### New

- Added to the setup section in the contribution doc for the devenv.nix shell. [f94cc27](https://github.com/callowayproject/bump-my-version/commit/f94cc274bdac4d13969254445ff414311407ebcd)

- Added devenv.nix and justfile. [653d917](https://github.com/callowayproject/bump-my-version/commit/653d917885b7e04c18a59b7b04c0d34a7ff186d8)

Addition of devenv.nix allows developers to easily create hermetic
environments in order to develop this package. This greatly simplifies
the setup of the environment, and utilizes uv's tooling to create the
virtual environment(s). Devenv.nix can also handle git-hooks, but that
is already handled via the .pre-commit-config.yaml file.

The justfile includes some helpful starter recipes. Additional recipes
can be added, such as build and publishing of the package/Docker.
### Other

- [pre-commit.ci] pre-commit autoupdate. [a85b47f](https://github.com/callowayproject/bump-my-version/commit/a85b47fd333c8e115085c44bf6b003d3010ef9f3)

**updates:** - [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.9...v0.11.0)

### Updates

- Improved mercurial test coverage. [e35eee1](https://github.com/callowayproject/bump-my-version/commit/e35eee17098731c8465c58ec33d29be5f9c13dea)


## 1.0.2 (2025-03-08)
[Compare the full difference.](https://github.com/callowayproject/bump-my-version/compare/1.0.1...1.0.2)

40 changes: 24 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ First off, thanks for taking the time to contribute! ❤️
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it much easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉

> If you like the project but don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
>
> - Star the project
> - Tweet about it
> - Refer to this project in your project's readme
@@ -21,13 +22,11 @@ All types of contributions are encouraged and valued. See the [Table of Contents
- [Styleguides](#styleguides)
- [Join The Project Team](#join-the-project-team)


## Code of Conduct

This project and everyone participating in it are governed by the
[Bump My Version Code of Conduct](https://github.com/callowayproject/bump-my-versionblob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior
to <coreyoordt@gmail.com>.

to <mailto:coreyoordt@gmail.com>.

## I Have a Question

@@ -54,16 +53,15 @@ A good bug report shouldn't leave others needing to chase you up for more inform
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/callowayproject/bump-my-version/issues).
- Also, make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform, and Version (Windows, Linux, macOS, x86, ARM)
- The version of Python
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?

- Stack trace (Traceback)
- OS, Platform, and Version (Windows, Linux, macOS, x86, ARM)
- The version of Python
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?

### How Do I Submit a Good Bug Report?

> You must never report security-related issues, vulnerabilities, or bugs that include sensitive information to the issue tracker or elsewhere in public. Instead, sensitive bugs must be sent by email to <coreyoordt@gmail.com>.
> You must never report security-related issues, vulnerabilities, or bugs that include sensitive information to the issue tracker or elsewhere in public. Instead, sensitive bugs must be sent by email to <mailto:coreyoordt@gmail.com>.
We use GitHub issues to track bugs and errors. If you run into an issue with the project:

@@ -78,7 +76,6 @@ Once it's filed:
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and will not address them until they are included.
- If the team is able to reproduce the issue, the issue will be left to be [implemented by someone](#your-first-code-contribution).


## Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Bump My Version, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
@@ -104,7 +101,6 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/callow

## Your First Code Contribution


> ### Legal Notice
>
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
@@ -115,7 +111,7 @@ There are several ways to create an isolated Python development environment. Thi

Run the following in a terminal:

```console
```sh
# Clone the repository
git clone https://github.com/callowayproject/bump-my-version.git

@@ -130,26 +126,37 @@ source env/bin/activate
python -m pip install -e .[dev,test]
```

If you are inclined to use the included `devenv.nix` environment, ensure you have both the `nix` package manager and `devenv` installed; reference the setup instructions for these tools [here](http://devenv.sh/getting-started/). Once `devenv` is installed, you can use the following command from the project's root directory:

```sh
# Create and enter the devenv shell
devenv shell
```

This will create an isolated shell with the necessary packages installed, as well as create the virtual environment for running the project using `uv`.

### Run tests

Once setup, you should be able to run tests:

```console
```sh
pytest
```

### Install Pre-commit Hooks

Pre-commit hooks are scripts that run every time you make a commit. If any of the scripts fail, it stops the commit. You can see a listing of the checks in the ``.pre-commit-config.yaml`` file.
Pre-commit hooks are scripts that run every time you make a commit. If any of the scripts fail, it stops the commit. You can see a listing of the checks in the `.pre-commit-config.yaml` file.

```console
```sh
pre-commit install
```

## Improving The Documentation

Please, please help us here.

## Styleguides

### Coding Style

All of the basic coding styles are configured into tools for fixing and checking them. [Pre-commit](https://pre-commit.com) is used to automate the process.
@@ -213,4 +220,5 @@ To have the change log generator ignore this commit, add to the summary line:
If you would like to be a maintainer, reach out to coreyoordt@gmail.com.

## Attribution

This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -22,11 +22,11 @@ ARG USER_UID=1000
ARG USER_GID=$USER_UID

LABEL org.opencontainers.image.authors="Calloway Project https://github.com/callowayproject"
LABEL org.opencontainers.image.created=2025-03-08T14:39:21Z
LABEL org.opencontainers.image.created=2025-03-22T13:38:16Z
LABEL org.opencontainers.image.url=https://github.com/callowayproject/bump-my-version
LABEL org.opencontainers.image.documentation=https://callowayproject.github.io/bump-my-version
LABEL org.opencontainers.image.source=https://github.com/callowayproject/bump-my-version
LABEL org.opencontainers.image.version=1.0.2
LABEL org.opencontainers.image.version=1.1.0
LABEL org.opencontainers.image.licenses=MIT

# Add a non-root user and group
7 changes: 4 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -39,18 +39,19 @@ runs:
git config --global user.name "$(gh api /users/${GITHUB_ACTOR} | jq .name -r)"
git config -l
- name: Install Python
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install bump-my-version
shell: bash
run: pip install "bump-my-version==1.0.2"
run: pip install "bump-my-version==1.1.0"
- name: Pass Inputs to Shell
id: bump
shell: bash
run: |
echo "previous-version=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT
bump-my-version bump ${{ inputs.args }}
([[ $? -gt 0 ]] && echo "bumped=false" || echo "bumped=true") >> $GITHUB_OUTPUT
echo "current-version=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion bumpversion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Top-level package for bump-my-version."""

__version__ = "1.0.2"
__version__ = "1.1.0"
Loading