8 Commits
1.1.0 ... 1.1.2

Author SHA1 Message Date
0666f7f593 Release Version 1.1.2
### Changed

- yaclog now only tries to use git when invoked with a command that needs it, meaning most sub commands can now be used on systems without git
2022-12-29 00:34:58 -08:00
51e28e4ef0 cleanup 2022-12-29 00:34:27 -08:00
a7cbacb687 Update changelog 2022-12-28 20:49:58 -08:00
3fa529a05c Bump actions/setup-python from 4.3.1 to 4.4.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.3.1...v4.4.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-27 20:26:05 -08:00
396960fae0 Only import toml and gitpython when necessary
Allows for using most commands on platforms without git installed (like the a-shell app on ios where gitpython doesnt quite work)
2022-12-27 20:21:18 -08:00
c661be05dc Bump actions/setup-python from 4.2.0 to 4.3.1
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.2.0 to 4.3.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.2.0...v4.3.1)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 23:34:48 -08:00
2f4124c0fc Test with python 3.11 2022-12-12 23:33:48 -08:00
465b818ca2 Release Version 1.1.1
### Fixed

- Fixed `yaclog release -C -c` not committing changes to cargo.toml
2022-08-14 17:39:12 -07:00
3 changed files with 24 additions and 6 deletions

View File

@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: [ "3.8", "3.9", "3.10" ] python-version: [ "3.8", "3.9", "3.10", "3.11" ]
click-version: [ "click~=7.0", "click~=8.0" ] click-version: [ "click~=7.0", "click~=8.0" ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.2.0 uses: actions/setup-python@v4.4.0
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4.2.0 uses: actions/setup-python@v4.4.0
with: with:
python-version: '3.x' python-version: '3.x'

View File

@ -2,6 +2,20 @@
All notable changes to this project will be documented in this file All notable changes to this project will be documented in this file
## Version 1.1.2 - 2022-12-29
### Changed
- yaclog now only tries to use git when invoked with a command that needs it, meaning most sub commands can now be used on systems without git
## Version 1.1.1 - 2022-08-15
### Fixed
- Fixed `yaclog release -C -c` not committing changes to cargo.toml
## Version 1.1.0 - 2022-08-14 ## Version 1.1.0 - 2022-08-14
### Added ### Added

View File

@ -16,10 +16,8 @@
import datetime import datetime
import os.path import os.path
from ..cli import cargo_toml
import click import click
import git
import yaclog.version import yaclog.version
from yaclog.changelog import Changelog from yaclog.changelog import Changelog
@ -52,7 +50,7 @@ def init(obj: Changelog):
click.echo(f'Created new changelog file at {obj.path}') click.echo(f'Created new changelog file at {obj.path}')
@cli.command('format') # dont accidentally hide the `format` python builtin @cli.command('format') # don't accidentally hide the `format` python builtin
@click.pass_obj @click.pass_obj
def reformat(obj: Changelog): def reformat(obj: Changelog):
"""Reformat the changelog file.""" """Reformat the changelog file."""
@ -254,10 +252,12 @@ def release(obj: Changelog, version_name, rel_seg, pre_seg, commit, cargo):
short_version = cur_version.name.replace(' ', '-') short_version = cur_version.name.replace(' ', '-')
if cargo: if cargo:
from ..cli import cargo_toml
cargo_toml.set_version("Cargo.toml", str(short_version)) cargo_toml.set_version("Cargo.toml", str(short_version))
click.echo("Updated Cargo.toml") click.echo("Updated Cargo.toml")
if commit: if commit:
import git
repo = git.Repo(os.curdir) repo = git.Repo(os.curdir)
if repo.bare: if repo.bare:
@ -265,6 +265,9 @@ def release(obj: Changelog, version_name, rel_seg, pre_seg, commit, cargo):
repo.index.add(obj.path) repo.index.add(obj.path)
if cargo:
repo.index.add("Cargo.toml")
tracked = len(repo.index.diff(repo.head.commit)) tracked = len(repo.index.diff(repo.head.commit))
untracked = len(repo.index.diff(None)) untracked = len(repo.index.diff(None))
@ -288,6 +291,7 @@ def release(obj: Changelog, version_name, rel_seg, pre_seg, commit, cargo):
else: else:
commit = repo.head.commit commit = repo.head.commit
# noinspection PyTypeChecker
repo_tag = repo.create_tag(short_version, ref=commit, message=cur_version.body(False)) repo_tag = repo.create_tag(short_version, ref=commit, message=cur_version.body(False))
click.echo(f"Created tag {click.style(repo_tag.name, fg='green')}.") click.echo(f"Created tag {click.style(repo_tag.name, fg='green')}.")