Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RIP 0007 Versioning Standard Hook

Validates release tags against RIP 0007.

Only MAJOR.MINOR.MICRO release tags are accepted.

Configuration

Add the hook to .pre-commit-config.yaml:

repos:
  - repo: https://github.com/RidgeRun/pre-commit-rip0007-versioning-standard
    rev: main
    hooks:
      - id: rip0007-versioning-standard

GitLab CI

Run the configured hooks for every tag pipeline:

validate-version-tag:
  stage: validate
  image: python:3.12-slim
  rules:
    - if: '$CI_COMMIT_TAG'
  before_script:
    - apt-get update
    - apt-get install --yes git
    - python -m pip install --upgrade pip pre-commit
  script:
    - pre-commit run --all-files

GitLab supplies the pushed tag as CI_COMMIT_TAG. The hook validates that value in CI and skips non-tag pipelines. Do not install this hook locally: Git does not provide a tag-creation hook, and pre-commit cannot reliably validate a pushed release tag.

About

Pre-commit validation for RidgeRun RIP 0007 versioning tags

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages