Skip to content

Commit

Permalink
Bump: Prepare version v1.0.1 (#64)
Browse files Browse the repository at this point in the history
* Chore: Version v1.0.0 -> v1.0.1
  • Loading branch information
gmuloc authored Jul 11, 2023
1 parent 6409fc4 commit d64b611
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 7 deletions.
70 changes: 70 additions & 0 deletions .github/release_process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Notes

Notes regarding how to release

## Bumping version

In a branch specific for this, use the `bumpver` tool.
It is configured to update:
* pyproject.toml
* j2lint/__init__.py
* tests/test_cli.py (where a test verifies the version output)

For instance to bump a patch version:
```
bumpver update --patch
```

and for a minor version

```
bumpver update --minor
```

Tip: It is possible to check what the changes would be using `--dry`

```
bumpver update --minor --dry
```

## Creating release on Github

Create the release on Github with the appropriate tag `vx.x.x`

## Release version `x.x.x`

TODO - make this a workflow

`x.x.x` is the version to be released

This is to be executed at the top of the repo

1. Checkout the latest version of devel with the correct tag for the release
2. [Optional] Clean dist if required
3. Build the package locally
```
python -m build
```
4. Check the package with `twine` (replace with your vesion)
```
twine check dist/j2lint-x.x.x-py3-none-any.whl
```
5. Upload the package to test.pypi
```
twine upload -r testpypi dist/j2lint-x.x.x.*
```
6. Verify the package by installing it in a local venv and checking it installs
and run correctly (run the tests)
```
# In a brand new venv
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --no-cache j2lint
```
7. Upload the package to pypi
```
twine upload dist/j2lint-x.x.x.*
```
8. Like 5 but for normal pypi
```
# In a brand new venv
pip install j2lint
```
2 changes: 1 addition & 1 deletion j2lint/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""__init__.py - A command-line utility that checks for best practices in Jinja2.
"""
NAME = "j2lint"
VERSION = "v1.0.0"
VERSION = "v1.0.1"
DESCRIPTION = __doc__

__author__ = "Arista Networks"
Expand Down
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "j2lint"
version = "v1.0.0"
version = "v1.0.1"
description = "Command-line utility that validates jinja2 syntax according to Arista's AVD style guide."
readme = "README.md"
authors = [{ name = "Arista Ansible Team", email = "ansible@arista.com" }]
Expand Down Expand Up @@ -55,16 +55,18 @@ Homepage = "https://github.com/aristanetworks/j2lint.git"
j2lint = "j2lint.cli:run"

[tool.bumpver]
current_version = "v1.0.0"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "Chore: version {old_version} -> {new_version}"
current_version = "v1.0.1"
version_pattern = "vMAJOR.MINOR.PATCH"
commit_message = "Chore: Version {old_version} -> {new_version}"
commit = true
tag = true
# No Tag
tag = false
push = false

[tool.bumpver.file_patterns]
"pyproject.toml" = ['current_version = "{version}"', 'version = "{version}"']
"j2lint/__init__.py" = ["{version}"]
"tests/test_cli.py" = ["{version}"]

[tool.pylint.'MESSAGES CONTROL']
max-line-length = 160
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def test_print_json_output(
pytest.param(["-h"], "HELP", "", 0, pytest.raises(SystemExit), 0, 0, id="help"),
pytest.param(
["--version"],
"Jinja2-Linter Version v1.0.0\n",
"Jinja2-Linter Version v1.0.1\n",
"",
0,
does_not_raise(),
Expand Down

0 comments on commit d64b611

Please sign in to comment.