{"id":25814641,"url":"https://github.com/cedrichopf/drone-semver","last_synced_at":"2025-02-28T03:32:44.723Z","repository":{"id":54318729,"uuid":"333220911","full_name":"cedrichopf/drone-semver","owner":"cedrichopf","description":"Drone CI Plugin for Semantic Versioning","archived":false,"fork":false,"pushed_at":"2021-02-24T12:50:12.000Z","size":25,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-05-09T10:38:58.579Z","etag":null,"topics":["continuous-integration","drone-ci","semver"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/cedrichopf/drone-semver","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cedrichopf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-26T21:22:49.000Z","updated_at":"2022-11-05T16:32:07.000Z","dependencies_parsed_at":"2022-08-13T11:50:53.542Z","dependency_job_id":null,"html_url":"https://github.com/cedrichopf/drone-semver","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedrichopf%2Fdrone-semver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedrichopf%2Fdrone-semver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedrichopf%2Fdrone-semver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedrichopf%2Fdrone-semver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedrichopf","download_url":"https://codeload.github.com/cedrichopf/drone-semver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241095221,"owners_count":19908772,"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":["continuous-integration","drone-ci","semver"],"created_at":"2025-02-28T03:32:44.227Z","updated_at":"2025-02-28T03:32:44.717Z","avatar_url":"https://github.com/cedrichopf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drone CI Plugin for Semantic Versioning\n\n- [Drone CI Plugin for Semantic Versioning](#drone-ci-plugin-for-semantic-versioning)\n  - [Overview](#overview)\n  - [Usage](#usage)\n  - [Settings](#settings)\n  - [Environment Variables](#environment-variables)\n  - [Auto-Increment](#auto-increment)\n    - [Example](#example)\n\n---\n\n## Overview\n\nThis plugin will fetch the current semantic version of the repository\nand store it into a file named `semver`. If no semantic version is available,\nthe plugin will generate an initial version based on the configuration.\n\nAdditionally, the plugin can be configured to automatically increment the semantic version\nbased on the content of a file, e.g. `CHANGELOG.md`.\n\n## Usage\n\n```yaml\n---\nkind: pipeline\ntype: docker\nname: semantic-version\n\ntrigger:\n  event:\n    - tag\n\nsteps:\n  - name: semver\n    image: cedrichopf/drone-semver\n    settings:\n      initial_version: 1.0.0\n      autoincrement: true\n      file: CHANGELOG.md\n```\n\n## Settings\n\n```yaml\nsettings:\n  initial_version: 1.0.0\n  autoincrement: true\n  file: CHANGELOG.md\n  file_regex: \"\\[(\\d\\.){2}\\d\\]\"\n  major_keyword: Major\n  minor_keyword: Minor\n```\n\nAll settings will be passed into the container using environment variables.\nA complete overview of the available environment variables can be found in the table below.\n\n## Environment Variables\n\nThe following table contains an overview of the available environment variables to configure\nthe application.\n\n| Name                   | Description                                    | Default Value     |\n| ---------------------- | ---------------------------------------------- | ----------------- |\n| DRONE_SEMVER           | Drone CI semver string, injected by Drone CI   | `-`               |\n| PLUGIN_INITIAL_VERSION | Initial version to use, e.g. `1.0.0`           | `1.0.0`           |\n| PLUGIN_AUTOINCREMENT   | Enable / disable autoincrement                 | `false`           |\n| PLUGIN_FILE            | File to detect autoincrement version           | `CHANGELOG.md`    |\n| PLUGIN_USE_REGEX       | Enable / disable file regex                    | `true`            |\n| PLUGIN_FILE_REGEX      | Regex to split the file into multiple sections | `\\[(\\d\\.){2}\\d\\]` |\n| PLUGIN_MAJOR_KEYWORD   | Keyword for Major update                       | `Major`           |\n| PLUGIN_MINOR_KEYWORD   | Keyword for Minor update                       | `Minor`           |\n\n## Auto-Increment\n\nThe plugin can automatically increment the semantic version by checking the content of a\ngiven file. Per default, it will look for a file called `CHANGELOG.md` in the root folder\nof the repository. The content of the file will be divided by the given regular expression\nconfigured using `PLUGIN_FILE_REGEX`. The default expression is dividing the content by\nversions in the format `[*.*.*]`.\n\n### Example\n\nThe following content shows an example of a changelog file containing a major update:\n\n```markdown\n# [Unreleased]\n\n- Something else\n- **Major** New update\n\n# [1.0.0]\n\n- Something\n```\n\nThe plugin will evaluate the following section:\n\n```markdown\n# [Unreleased]\n\n- Something else\n- **Major** New update\n```\n\nSince this section contains the keyword `Major`, which is the default keyword configured\nusing `PLUGIN_MAJOR_KEYWORD`, it will increment the semantic version using a major update.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedrichopf%2Fdrone-semver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedrichopf%2Fdrone-semver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedrichopf%2Fdrone-semver/lists"}