{"id":17355148,"url":"https://github.com/zephinzer/gosemver","last_synced_at":"2025-03-27T15:21:18.776Z","repository":{"id":79926646,"uuid":"176136150","full_name":"zephinzer/gosemver","owner":"zephinzer","description":"Go forth and semver","archived":false,"fork":false,"pushed_at":"2019-03-24T16:27:03.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T19:13:55.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zephinzer.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,"publiccode":null,"codemeta":null}},"created_at":"2019-03-17T17:30:22.000Z","updated_at":"2019-03-24T16:26:44.000Z","dependencies_parsed_at":"2023-07-30T05:45:13.722Z","dependency_job_id":null,"html_url":"https://github.com/zephinzer/gosemver","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephinzer%2Fgosemver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephinzer%2Fgosemver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephinzer%2Fgosemver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephinzer%2Fgosemver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zephinzer","download_url":"https://codeload.github.com/zephinzer/gosemver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245868327,"owners_count":20685609,"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":[],"created_at":"2024-10-15T17:42:28.518Z","updated_at":"2025-03-27T15:21:18.751Z","avatar_url":"https://github.com/zephinzer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Semver\nGo Semver helps you to version your code via semver.\n\n## Installation\n\n### Via `go get`\n`go get github.com/zephinzer/gosemver`\n\n### Other Platforms\nComing soon!\n\n## Usage\n\n### Version Bump\nTo bump a version, use the sub-command `bump`:\n\n```sh\ngosemver bump [BUMP_WHAT]\n```\n\nWhere `[BUMP_WHAT]` is one of `\"label\"`, `\"patch\"`, `\"minor\"`, or `\"major\"`.\n\n#### Version Bump Config Flags\n\n| Flag | Description |\n| --- | --- |\n| `--yes` | Automatically bumps the version, no questions asked |\n| `--prefix [string]` | Takes into account a prefix string (eg. `v`) |\n\n### Version Retrieval\nShould you wish to just retrieve the current version, there are two ways of doing so. The default retrieves the highest semver version:\n\n```sh\ngosemver get\n```\n\nThis sub-command also allows for passing in of a semver section to retrieve just that section. This can be one of `\"label\"`, `\"patch\"`, `\"minor\"`, or `\"major\"`:\n\n```sh\n# retrieve just the label\ngosemver get label\n\n# retrieve just the major version\ngosemver get major\n```\n\n#### Version Retrieval Config Flags\n\n| Flag | Description |\n| --- | --- |\n| `--prefix [string]` | Takes into account a prefix string (eg. `v`) |\n\n### Version Setting\nTo set the version manually, you could use the `set` sub-command:\n\n```sh\ngosemver set 1.0.0\n```\n\n#### Version Setting Config Flags\n\n| Flag | Description |\n| --- | --- |\n| `--prefix [string]` | Takes into account a prefix string (eg. `v`) |\n\n## Flag Configuration\n\n### Flag: `--mode`\nThis flag specifies how to retrieve the versions, the value should be one of `\"current\"` or `\"latest\"`.\n\n```sh\n# this will return the most recently added tag\ngosemver get --mode current\n\n# this will return the highest power semver\ngosemver get --mode latest\n```\n\n### Flag: `--prefix`\nTo process tags with a prefix, use the `--prefix` flag:\n\n```sh\n# this will account for semver versions prefixed with a letter 'v'\ngosemver bump patch --yes --prefix v;\ngosemver get --prefix v;\n```\n\n### Flag: `--yes`\nTo run it in CI mode without any questions asked, use the `--yes` flag:\n\n```sh\n# this will bump the patch with no questions asked\ngosemver bump patch --yes\n```\n\n# Cheers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephinzer%2Fgosemver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzephinzer%2Fgosemver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephinzer%2Fgosemver/lists"}