{"id":22725198,"url":"https://github.com/meinto/git-semver","last_synced_at":"2025-04-13T19:08:49.232Z","repository":{"id":80560657,"uuid":"172231743","full_name":"meinto/git-semver","owner":"meinto","description":"a small cli tool to version your git repository with semantic versioning","archived":false,"fork":false,"pushed_at":"2019-03-30T17:06:22.000Z","size":163,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-19T06:46:32.111Z","etag":null,"topics":["git","semantic-versioning","semver"],"latest_commit_sha":null,"homepage":"","language":"Go","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/meinto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-02-23T15:44:05.000Z","updated_at":"2024-01-26T10:16:48.000Z","dependencies_parsed_at":"2023-08-26T03:35:56.080Z","dependency_job_id":null,"html_url":"https://github.com/meinto/git-semver","commit_stats":null,"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinto%2Fgit-semver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinto%2Fgit-semver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinto%2Fgit-semver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinto%2Fgit-semver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meinto","download_url":"https://codeload.github.com/meinto/git-semver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229082285,"owners_count":18017251,"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":["git","semantic-versioning","semver"],"created_at":"2024-12-10T15:10:12.351Z","updated_at":"2024-12-10T15:10:12.857Z","avatar_url":"https://github.com/meinto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-semver: A cli tool for versioning your git repository\n\n## Why\n\nThere is no standardized way to version a git repository. Node applications store their version in a package.json, other appications store it in a Makefile or somewhere else.\n\nWhat i want is small cli tool that handles the version of my repository, no matter what technology is under the hood.\n\n## Installation\n\n**brew**\n\n```bash\nbrew tap meinto/git-semver https://github.com/meinto/git-semver\nbrew install meinto/git-semver/git-semver\n```\n\n**manually**\n\nDownload the corresponding [latest binary](https://github.com/meinto/git-semver/releases) and run the `install` command. Right now the `install` command is only valid for mac and linux.\n\n```bash\n\u003cname-of-binary\u003e install\n```\n\nYou can use `semver` as a gitplugin by using the following syntax:\n\n```bash\ngit semver version ...\n```\n\n## Usage\n\nBy default this cli tool uses a `VERSION` file in the root folder of a git repository to store the version. The versioning is built up on [semantic versioning](https://semver.org/).\n\n```bash\nsemver version [major|minor|patch] \\\n  [--dryrun] \\                        # default: false -- only show how version would change\n  [-p \u003cpath-to-repo\u003e] \\               # default: .\n  [-f \u003cversion-file-name\u003e] \\          # default: VERSION -- define alternative version file\n  [-t \u003cversion-file-type\u003e] \\          # default: raw -- you can set the values \"json\" or \"raw\"\n  [--tag] \\                           # default: false -- tag the commit with the new version\n  [--push] \\                          # default: false -- push all changes made by semver\n```\n\nYou can create an individual `semver.config.json` file in the root of your project to override the default values of the flags. Simply run the `semver init` command and follow the instructions.\n\n### Custom version file\n\nBy default `semver` lookup the `VERSION` file in the current directory. If you want to store your version in a custom file use the flag `-f`.\n\nIf you prefer a `json` file which contains the version number in a `version` property you can do this by using the flags `-f` in combination with `-t`:\n\n\u003e Auto file type detection will be implemented in the next release.  \n\u003e If you can't wait, please send a pull request :)\n\n```bash\nsemver version minor -f package.json -t json\n```\n\nIf your defined version file is of type `json`, the cli tool only overrides the property `version` and leaves other properties untouched.\n\n### Create git tag\n\nWith the flag `--tag` or short `-T`, `semver` will create a git tag of the new version e.g.: `v1.0.0`.\n\n### Push version changes\n\n`semver` writes the new version back into the version file. As described, you can also tag the commit using the flag `-T`. To automatically push these changes made by `semver`, use the flag `--push` or short `-P`.\n\n## Get Version(s)\n\nWith the `get` command you can get the current or next possible versions.\n\n```bash\nsemver get         # will print the current version\nsemver get major   # will print the next major version\nsemver get minor   # will print the next minor version\nsemver get patch   # will print the next patch version\n```\n\nWith the `--raw` or short `-r` flag you will get the plain number without description. For example:\n\n```bash\nsemver get minor --raw\n```\n\n## Contribute\n\nCreate a fork, make your changes, and send a pull request. :sunglasses:","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeinto%2Fgit-semver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeinto%2Fgit-semver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeinto%2Fgit-semver/lists"}