Skip to main content

SemVer automation CLI based on PR title

Project description

Bifrons

PyPI version Python versions License

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 com 0.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 pytest para rodar os testes em tests/.

  • Linting: Use black bifrons/ para formatar o código.

Autor

Fernando Barreto

Licença

MIT License. Veja o arquivo LICENSE para detalhes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bifrons-1.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bifrons-1.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for bifrons-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1be5751dedee463bd433b53d26e04d8c6f71b084c017e933a1cb5f11074842a7
MD5 f8327dfac9aedd810dcdfb84546c14b3
BLAKE2b-256 7b1df218196408735a9fb68e2ced3c8aa858392392ece2e8a60bc46dd9943f82

See more details on using hashes here.

Provenance

The following attestation bundles were made for bifrons-1.1.0.tar.gz:

Publisher: publish.yml on Kalimbinha/Bifrons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for bifrons-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b60a359180accffcacc802f13a2c9736892e6e39564aeac62adc43f01eb8613f
MD5 abeb6bb9324e6735320d76b76305573c
BLAKE2b-256 94991331230b146486584601cc434121299e49f58df74bce9067c27bec0004ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for bifrons-1.1.0-py3-none-any.whl:

Publisher: publish.yml on Kalimbinha/Bifrons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page