SemVer automation CLI based on PR title
Project description
Bifrons
CLI para automação de versões SemVer baseada em títulos de PR/commit.
Repositório: https://github.com/Kalimbinha/Bifrons
Pypi: https://pypi.org/project/bifrons/
Descrição
O Bifrons analisa o título de uma PR ou commit e incrementa automaticamente a versão seguindo as regras do Semantic Versioning (SemVer). Ele classifica o título em:
- patch (correções): títulos começando com "fix"
- minor (novos recursos): títulos começando com "feat" ou "feature"
- major (mudanças incompatíveis): títulos começando com "breaking", "major" ou contendo "breaking change"
A versão atual é lida/escrita no arquivo version.txt no diretório atual.
Instalação
Certifique-se de ter Python 3.8+ instalado.
pip install bifrons
Uso
Execute o comando com o título da PR/commit:
bifrons --title "fix: correção de bug"
Exemplos
-
Patch (correção):
bifrons --title "fix: resolve memory leak"
Saída:
[bifrons] versão anterior: 1.0.0 [bifrons] nova versão: 1.0.1
-
Minor (novo recurso):
bifrons --title "feat: add dark mode"
Saída:
[bifrons] versão anterior: 1.0.1 [bifrons] nova versão: 1.1.0
-
Major (mudança incompatível):
bifrons --title "breaking: remove deprecated API"
Saída:
[bifrons] versão anterior: 1.1.0 [bifrons] nova versão: 2.0.0
-
Título inválido:
bifrons --title "random title"
Saída:
Erro: Título inválido! Use fix/feat/major
Arquivo de Versão
- O arquivo
version.txté criado automaticamente se não existir (inicia com0.0.0). - Ele contém apenas a versão atual (ex.:
1.2.3). - Execute no diretório onde deseja gerenciar a versão.
Desenvolvimento
-
Estrutura do Projeto:
Bifrons/ ├── bifrons/ │ ├── __init__.py │ ├── cli.py # Interface de linha de comando │ └── core.py # Lógica principal ├── pyproject.toml # Configuração do projeto ├── README.md # Este arquivo └── version.txt # Arquivo de versão (gerado)
-
Testes: Execute
pytestpara rodar os testes emtests/. -
Linting: Use
black bifrons/para formatar o código.
Autor
Fernando Barreto
Licença
MIT License. Veja o arquivo LICENSE para detalhes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bifrons-1.1.0.tar.gz.
File metadata
- Download URL: bifrons-1.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1be5751dedee463bd433b53d26e04d8c6f71b084c017e933a1cb5f11074842a7
|
|
| MD5 |
f8327dfac9aedd810dcdfb84546c14b3
|
|
| BLAKE2b-256 |
7b1df218196408735a9fb68e2ced3c8aa858392392ece2e8a60bc46dd9943f82
|
Provenance
The following attestation bundles were made for bifrons-1.1.0.tar.gz:
Publisher:
publish.yml on Kalimbinha/Bifrons
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bifrons-1.1.0.tar.gz -
Subject digest:
1be5751dedee463bd433b53d26e04d8c6f71b084c017e933a1cb5f11074842a7 - Sigstore transparency entry: 750294193
- Sigstore integration time:
-
Permalink:
Kalimbinha/Bifrons@bbeb6d83cb780e21e06394b4e3f6c2db5c55b899 -
Branch / Tag:
refs/tags/Deploy - Owner: https://github.com/Kalimbinha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bbeb6d83cb780e21e06394b4e3f6c2db5c55b899 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bifrons-1.1.0-py3-none-any.whl.
File metadata
- Download URL: bifrons-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b60a359180accffcacc802f13a2c9736892e6e39564aeac62adc43f01eb8613f
|
|
| MD5 |
abeb6bb9324e6735320d76b76305573c
|
|
| BLAKE2b-256 |
94991331230b146486584601cc434121299e49f58df74bce9067c27bec0004ee
|
Provenance
The following attestation bundles were made for bifrons-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on Kalimbinha/Bifrons
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bifrons-1.1.0-py3-none-any.whl -
Subject digest:
b60a359180accffcacc802f13a2c9736892e6e39564aeac62adc43f01eb8613f - Sigstore transparency entry: 750294221
- Sigstore integration time:
-
Permalink:
Kalimbinha/Bifrons@bbeb6d83cb780e21e06394b4e3f6c2db5c55b899 -
Branch / Tag:
refs/tags/Deploy - Owner: https://github.com/Kalimbinha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bbeb6d83cb780e21e06394b4e3f6c2db5c55b899 -
Trigger Event:
release
-
Statement type: