{"id":16486791,"url":"https://github.com/lukaszraczylo/semver-generator","last_synced_at":"2025-03-16T18:31:48.751Z","repository":{"id":48737261,"uuid":"365646101","full_name":"lukaszraczylo/semver-generator","owner":"lukaszraczylo","description":"Semantic version generator using git commit keywords and overrides","archived":false,"fork":false,"pushed_at":"2025-03-13T03:15:30.000Z","size":545,"stargazers_count":37,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-13T04:20:10.867Z","etag":null,"topics":["cicd","development","programming","semver"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukaszraczylo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["lukaszraczylo"],"custom":["monzo.me/lukaszraczylo"]}},"created_at":"2021-05-09T01:48:03.000Z","updated_at":"2025-03-13T03:10:40.000Z","dependencies_parsed_at":"2024-05-04T22:19:57.262Z","dependency_job_id":"f32e778e-b0b5-423c-9d65-2fffeeb13aca","html_url":"https://github.com/lukaszraczylo/semver-generator","commit_stats":{"total_commits":141,"total_committers":3,"mean_commits":47.0,"dds":"0.014184397163120588","last_synced_commit":"601f486b60187b68092116ca4c09294022f6f085"},"previous_names":[],"tags_count":171,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Fsemver-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Fsemver-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Fsemver-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Fsemver-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukaszraczylo","download_url":"https://codeload.github.com/lukaszraczylo/semver-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826783,"owners_count":20354220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","development","programming","semver"],"created_at":"2024-10-11T13:30:27.001Z","updated_at":"2025-03-16T18:31:48.710Z","avatar_url":"https://github.com/lukaszraczylo.png","language":"Go","funding_links":["https://github.com/sponsors/lukaszraczylo","monzo.me/lukaszraczylo"],"categories":[],"sub_categories":[],"readme":"## Semantic version generator\n\n[![Docker image build.](https://github.com/lukaszraczylo/semver-generator/actions/workflows/release.yaml/badge.svg)](https://github.com/lukaszraczylo/semver-generator/actions/workflows/release.yaml) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/lukaszraczylo/semver-generator) [![codecov](https://codecov.io/gh/lukaszraczylo/semver-generator/branch/main/graph/badge.svg?token=FY9BKETB59)](https://codecov.io/gh/lukaszraczylo/semver-generator)\n\nProject created overnight, to prove that management of semantic versioning is NOT painful and do not require arguments and debates within the team. Simple, clean and only thing the project team should need to agree to are the keywords.\n\n- [Semantic version generator](#semantic-version-generator)\n  - [How does it work](#how-does-it-work)\n  - [Additional features](#additional-features)\n  - [Important changes](#important-changes)\n  - [Usage](#usage)\n    - [Authentication](#authentication)\n    - [As a binary](#as-a-binary)\n    - [As a github action](#as-a-github-action)\n    - [As a docker container](#as-a-docker-container)\n    - [Calculations example \\[standard\\]](#calculations-example-standard)\n    - [Calculations example \\[strict matching\\]](#calculations-example-strict-matching)\n    - [Release candidates](#release-candidates)\n    - [Example configuration](#example-configuration)\n  - [Good to know](#good-to-know)\n\n### How does it work\n\n* Binary clones the github repository\n* Iterates through the list of commits looking for the keywords specified in config file for additional bumps of versions\n* Returns the semantic version which can be included in the release\n\n### Additional features\n\n* With flag `-e` or config `force.existing: true` the existing tags in versioning will be respected, helping you to avoid the version conflicts.\n* With config `force.commit: deadbeef` where `deadbeef` is the commit hash - calculations will start from the specified commit.\n\n### Important changes\n\n* From version `1.4.2+` as pointed out in [issue #12](https://github.com/lukaszraczylo/semver-generator/issues/12) commits from merge will not be included in the calculations and commits themselves will bump the version on first match ( starting checks from `patch` upwards ).\n* Added support for blacklisting terms to ignore specific commits, branch names, and merge messages from version calculations.\n\n### Usage\n\n#### Authentication\n\nIf you intend to use this project with remote repositories ( regardless of them being private or public ) you need to authenticate with your repository.\nTo do so you can utilise the following environment variables ( they are NOT github specific, for other providers you can use the password )\n\n```bash\nexport GITHUB_USERNAME=lukaszraczylo\nexport GITHUB_TOKEN=yourPersonalApiToken\n```\n\n#### As a binary\n\nYou can download latest versions of the binaries from the [release page](https://github.com/lukaszraczylo/semver-generator/releases/latest).\n\n**Supported OS and architectures:**\nDarwin ARM64/AMD64, Linux ARM64/AMD64, Windows AMD64\n\n```bash\nbash$ ./semver-gen generate -r https://github.com/nextapps-de/winbox\nSEMVER 9.0.10\nbash$ ./semver-gen generate -l\nSEMVER 5.1.1\n```\n\n**Local repository flag `-l` will always take precedence over remote repository URL**\n\n```yaml\nUsage:\n  semver-gen generate [flags]\n  semver-gen [command]\n\nAvailable Commands:\n  generate    Generates semantic version\n  help        Help about any command\n\nFlags:\n  -c, --config string       Path to config file (default \"semver.yaml\")\n  -d, --debug               Enable debug mode\n  -e, --existing            Respect existing tags\n  -h, --help                help for semver-gen\n  -l, --local               Use local repository\n  -r, --repository string   Remote repository URL. (default \"https://github.com/lukaszraczylo/simple-gql-client\")\n  -b, --branch string       Remote repository URL Branch. (default \"main\")\n  -s, --strict              Strict matching\n  -u, --update              Update binary with latest\n  -v, --version             Display version\n```\n\n#### As a github action\n\n```yaml\njobs:\n  prepare:\n    name: Preparing build context\n    runs-on: ubuntu-latest\n    outputs:\n      RELEASE_VERSION: ${{ steps.semver.outputs.semantic_version }}\n    steps:\n      - name: Checkout repo\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: '0'\n      - name: Semver run\n        id: semver\n        uses: lukaszraczylo/semver-generator@PLACE_LATEST_TAG_HERE\n        # you can also use v1 tag which _should_ automatically upgrade to latest\n        # uses: lukaszraczylo/semver-generator@v1\n        with:\n          config_file: semver.yaml\n          # either...\n          repository_local: true\n          # or...\n          repository_url: https://github.com/lukaszraczylo/simple-gql-client\n          # when using remote repository, especially with private one:\n          github_username: lukaszraczylo\n          github_token: MySupeRSecr3tPa$$w0rd\n          strict: true\n          existing: false\n      - name: Semver check\n        run: |\n          echo \"Semantic version detected: ${{ steps.semver.outputs.semantic_version }}\"\n```\n\n#### As a docker container\n\n```bash\ndocker pull ghcr.io/lukaszraczylo/semver-generator:latest\n```\n\n**Docker supported architectures:**\nLinux/arm64, Linux/amd64\n\n#### Calculations example [standard]\n\n```bash\n- 0.0.1 - PATCH - starting commit\n- 0.0.2 - PATCH - another commit\n- 0.0.4 - PATCH - another commit with word 'Update' =\u003e DOUBLE increment PATCH\n- 0.1.0 - MINOR - after commit with word 'Change' =\u003e increment MINOR, reset PATCH\n- 0.1.1 - PATCH - additional commit\n- 1.0.1 - MAJOR - commit with word 'BREAKING' = \u003e INCREMENT MAJOR, reset MINOR\n- 1.0.2 - PATCH - another commit\n```\n\n#### Calculations example [strict matching]\n\n```bash\n- 0.0.1 - PATCH - starting commit\n- 0.0.1 - PATCH - another commit\n- 0.0.1 - PATCH - another commit with word 'Update' =\u003e SINGLE increment PATCH\n- 0.1.0 - MINOR - after commit with word 'Change' =\u003e increment MINOR, reset PATCH\n- 0.1.0 - PATCH - additional commit\n- 1.0.0 - MAJOR - commit with word 'BREAKING' = \u003e INCREMENT MAJOR, reset MINOR\n- 1.0.0 - PATCH - another commit\n```\n\n#### Release candidates\n\nThe `semver-gen` supports release candidates generation as well. Add following configuration ( and change the trigger keywords to anything what suits you )\nto generate the appropriate release in format `1.3.37-rc.1` and counting up until next `minor` trigger will be detected.\n\n```yaml\n  release:\n    - release-candidate\n    - add-rc\n```\n\n#### Example configuration\n\n```yaml\nversion: 1\nforce:\n  major: 1\n  minor: 0\n  patch: 1\n  commit: 69fbe2df696f40281b9104ff073d26186cde1024\nblacklist:\n  - \"Merge branch\"\n  - \"Merge pull request\"\n  - \"feature/\"\n  - \"feature:\"\nwording:\n  patch:\n    - update\n    - initial\n  minor:\n    - change\n    - improve\n  major:\n    - breaking\n    - the # For testing purposes\n  release:\n    - release-candidate\n    - add-rc\n```\n\n* `version`: is not respected at the moment, introduced for potential backwards compatibility in future\n* `force`: sets the \"starting\" version, you don't need to specify this section as the default is always `0`\n* `force.commit`: allows you to set commit hash from which the calculations should start\n* `blacklist`: terms to ignore when processing commits. Any commit containing these terms will be skipped in version calculations. Useful for ignoring merge commits, feature branch names, and other unwanted triggers.\n* `wording`: words the program should look for in the git commits to increment (patch|minor|major)\n\n### Good to know\n\n* Word matching uses fuzzy search AND is case INSENSITIVE\n* I do not recommend using common words ( like \"the\" from the example configuration )\n* You can specify env variable `LOG_LEVEL=debug` to see what exactly happens during the calculations\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaszraczylo%2Fsemver-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukaszraczylo%2Fsemver-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaszraczylo%2Fsemver-generator/lists"}