{"id":20217581,"url":"https://github.com/pforret/setver","last_synced_at":"2025-06-19T10:35:52.251Z","repository":{"id":53051562,"uuid":"283863144","full_name":"pforret/setver","owner":"pforret","description":"Easy semver tool  -- get/set package version from git tags (Github/Bitbucket/Gitlab), composer.json (PHP), package.json (npm)","archived":false,"fork":false,"pushed_at":"2024-03-03T09:46:52.000Z","size":1598,"stargazers_count":25,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T13:36:09.101Z","etag":null,"topics":["bash","bashew","composer","git-tag","npm","npm-publish","package","php","semver","shell-script","tagging","versioning"],"latest_commit_sha":null,"homepage":"https://pforret.github.io/#pforretsetver","language":"Shell","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/pforret.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2020-07-30T19:44:51.000Z","updated_at":"2024-09-09T22:44:45.000Z","dependencies_parsed_at":"2024-03-03T10:46:04.245Z","dependency_job_id":null,"html_url":"https://github.com/pforret/setver","commit_stats":null,"previous_names":[],"tags_count":98,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fsetver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fsetver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fsetver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fsetver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pforret","download_url":"https://codeload.github.com/pforret/setver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243499,"owners_count":21071054,"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":["bash","bashew","composer","git-tag","npm","npm-publish","package","php","semver","shell-script","tagging","versioning"],"created_at":"2024-11-14T06:34:43.710Z","updated_at":"2025-04-10T15:43:58.202Z","avatar_url":"https://github.com/pforret.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub tag](https://img.shields.io/github/v/tag/pforret/setver)\n![Shellcheck CI](https://github.com/pforret/setver/workflows/Shellcheck%20CI/badge.svg)\n![Bash CI](https://github.com/pforret/setver/workflows/Bash%20CI/badge.svg)\n![GitHub](https://img.shields.io/github/license/pforret/setver)\n[![basher install](https://img.shields.io/badge/basher-install-white?logo=gnu-bash\u0026style=flat)](https://basher.gitparade.com/package/)\n\n# setver\n![setver logo](setver.jpg)\n\n## TL;DR\n```bash\n# to commit (and ask for message) and push new changes to Github/Bitbucket\nsetver push\n    \n# to commit with automatic commit message and push new changes to Github/Bitbucket\nsetver auto\n    \n# to just bump the version \nsetver new minor\n\n# to commit, push and bump the version in 1 go\nsetver ap               # stands for autopatch    \n```\n## Supported versioning \n\n* Semantic Versioning helper script, to get and set semver version numbers\n* handles versioning for `composer.json`: for PHP, composer packages\n* handles versioning for `package.json`: for node, npm\n* handles versioning for `.env.example`: for PHP, Python, Ruby\n* handles versioning for `VERSION.md`: for bash\n* handles versioning for `shellscript.sh`: for bash\n* handles versioning by '`git tag`': for Github, Bitbucket\n\n## Usage\n```\nProgram: setver 2.3.0 by peter@forret.com\nUpdated: Mar 18 16:57:57 2023\nDescription: setver but based on bashew\nUsage: setver [-h] [-q] [-v] [-f] [-r] [-C] [-N] [-l \u003clog_dir\u003e] [-t \u003ctmp_dir\u003e] [-p \u003cprefix\u003e] \u003caction\u003e \u003cinput?\u003e\nFlags, options and parameters:\n    -h|--help        : [flag] show usage [default: off]\n    -q|--quiet       : [flag] no output [default: off]\n    -v|--verbose     : [flag] output more [default: off]\n    -f|--force       : [flag] do not ask for confirmation [default: off]\n    -r|--root        : [flag] do not check if in root folder of repo [default: off]\n    -C|--SKIP_COMPOSER: [flag] do not modify composer.json [default: off]\n    -N|--SKIP_NPM    : [flag] do not modify package.json (for npm) [default: off]\n    -l|--log_dir \u003c?\u003e : [option] folder for log files   [default: /Users/pforret/log/setver]\n    -t|--tmp_dir \u003c?\u003e : [option] folder for temp files  [default: /tmp/setver]\n    -p|--prefix \u003c?\u003e  : [option] prefix to use for git tags  [default: v]\n    \u003caction\u003e         : [parameter] action to perform: get/check/push/set/new/md/message/auto/autopatch/ap/skip/changelog/history\n    \u003cinput\u003e          : [parameter] input text (optional)\n                                                                                                             \n                                  \n### TIPS \u0026 EXAMPLES\n* use setver get to get the version (returns 1 line with the version nr)\n* use setver check to get all versions available in this repo\n* use setver message to get the current auto-generated commit message\n* use setver auto to do commit/push with auto-generated commit message\n* use setver autopatch or setver ap to do commit/push with auto-generated commit message \u0026 bump patch version\n* use setver autominor to do commit/push with auto-generated commit message \u0026 bump minor version\n* use setver skip to do commit/push with auto-generated commit message and skip GH actions\n* use setver md to generate a correct VERSION.md file, if it does not yet exist\n* use setver new major/minor/patch to bump version number with 1\n* use setver set x.y.z to set new version number\n* use setver push to do commit/push with auto-generated commit message\n* use setver history to show the git history in a compact format\n* use setver check to check if this script is ready to execute and what values the options/flags are\n  setver check\n* use setver env to generate an example .env file\n  setver env \u003e .env\n* use setver update to update to the latest version\n  setver check\n* \u003e\u003e\u003e bash script created with pforret/bashew\n* \u003e\u003e\u003e for bash development, also check out pforret/setver and pforret/progressbar\n```\n\n## Example:\n\n    \u003e setver new patch   \n    ✔  version 1.12.0 -\u003e 1.12.1\n    ✔  set version in package.json\n    ✔  set version in composer.json\n    ✔  set version in .env.example\n    ✔  set version in VERSION.md\n    ✔  set version in shellscript.sh\n    ✔  commit and push changed files\n    ✔  push tags to git@github.com:pforret/setver.git\n    ✔  to create a release, go to https://github.com/pforret/setver\n\n\n## Installation\n\nwith [basher](https://github.com/basherpm/basher)\n\n    basher install pforret/setver\n\nor the hard way\n\n    # clone this repo\n    git clone https://github.com/pforret/setver.git\n    # if you want the script to be in your path\n    ln -s \u003ccloned_folder\u003e/setver /usr/local/bin/\n\n## References\n* https://semver.org/\n\n\t\tGiven a version number MAJOR.MINOR.PATCH, increment the:\n\t\tMAJOR version when you make incompatible API changes,\n\t\tMINOR version when you add functionality in a backwards compatible manner, and\n\t\tPATCH version when you make backwards compatible bug fixes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fsetver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpforret%2Fsetver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fsetver/lists"}