{"id":18610559,"url":"https://github.com/ixnode/bash-version-manager","last_synced_at":"2026-02-16T10:39:04.765Z","repository":{"id":64934187,"uuid":"448622727","full_name":"ixnode/bash-version-manager","owner":"ixnode","description":"This tool helps you to _maintain_ the versions in the current path. It increments the patch, minor or major version and replaces them in the corresponding files.","archived":false,"fork":false,"pushed_at":"2024-12-07T21:49:06.000Z","size":82,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T02:36:57.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ixnode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2022-01-16T17:21:10.000Z","updated_at":"2024-12-07T21:49:06.000Z","dependencies_parsed_at":"2025-05-07T01:06:40.673Z","dependency_job_id":"155c32d1-f7b5-44d2-b24a-d35f37c15ccd","html_url":"https://github.com/ixnode/bash-version-manager","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"98f0a77854bca5d76f3aa4de85b50ba1e2b35ad3"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ixnode/bash-version-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-version-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-version-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-version-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-version-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ixnode","download_url":"https://codeload.github.com/ixnode/bash-version-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-version-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29506253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-07T03:11:03.609Z","updated_at":"2026-02-16T10:39:04.721Z","avatar_url":"https://github.com/ixnode.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BashVersionManager\n\nThis tool helps you to _maintain_ the versions in the current path. It increments\nthe patch, minor or major version and replaces them in the corresponding files.\n\n## Create new `VERSION` file\n\nThe `VERSION` file is used as the source for the version number. A missing file can be created\nautomatically.\n\n```bash\n❯ bin/version-manager --current\n\n[2022-01-16 16:51:41] (error)   → Version file \"~/ixno/bash-version-manager/VERSION\" not found.\n\nDo you want to create a version file \"VERSION\" with version \"0.1.0\"? y\n\n[2022-01-16 16:51:43] (error)   → Version file \"~/ixno/bash-version-manager/VERSION\" successfully created.\n```\n\n## Optional: Create `.env` file\n\nCurrently, the variable `VERSION_APP` can be replaced in the `.env` file:\n\n```bash\n❯ cat \u003c\u003cEOT \u003e\u003e .env\n# Version of this app\nVERSION_APP=$(cat VERSION)\n\n# Version of this app\nVERSION_APP_LATEST=latest\nEOT\n```\n\n## Show current version\n\nIf you want to see the current version, use the following command.\n\n```bash\n❯ bin/version-manager --current\n\nCurrent version: 0.1.0\n\nNext major version: 1.0.0 (Use bin/version-manager --major)\nNext minor version: 0.2.0 (Use bin/version-manager --minor)\nNext patch version: 0.1.1 (Use bin/version-manager --patch)\n```\n\n## Switch patch version\n\nTo change the patch version use the flag `--patch`.\n\n```bash\n❯ bin/version-manager --patch\n\nCurrent version: 0.1.0\nNew version:     0.1.1\n\nDo you want to set the new version \"0.1.1\" (y/n)? y\n\n[2022-01-16 16:57:46] (info)    → Set version \"0.1.1\" to \"~/ixno/bash-version-manager/VERSION\"\n[2022-01-16 16:57:46] (success) → Done.\n[2022-01-16 16:57:46] (info)    → Set version \"0.1.1\" to \"~/ixno/bash-version-manager/.env\"\n[2022-01-16 16:57:46] (success) → Done.\n```\n\n## Switch minor version\n\nTo change the minor version use the flag `--minor`.\n\n```bash\n❯ bin/version-manager --minor\n\nCurrent version: 0.1.0\nNew version:     0.2.0\n\nDo you want to set the new version \"0.2.0\" (y/n)? y\n\n[2022-01-16 16:58:32] (info)    → Set version \"0.2.0\" to \"~/ixno/bash-version-manager/VERSION\"\n[2022-01-16 16:58:32] (success) → Done.\n[2022-01-16 16:58:32] (info)    → Set version \"0.2.0\" to \"~/ixno/bash-version-manager/.env\"\n[2022-01-16 16:58:32] (success) → Done.\n```\n\n## Switch major version\n\nTo change the major version use the flag `--major`.\n\n```bash\n❯ bin/version-manager --major\n\nCurrent version: 0.1.0\nNew version:     1.0.0\n\nDo you want to set the new version \"1.0.0\" (y/n)? y\n\n[2022-01-16 16:59:06] (info)    → Set version \"1.0.0\" to \"~/ixno/bash-version-manager/VERSION\"\n[2022-01-16 16:59:06] (success) → Done.\n[2022-01-16 16:59:06] (info)    → Set version \"1.0.0\" to \"~/ixno/bash-version-manager/.env\"\n[2022-01-16 16:59:06] (success) → Done.\n```\n\n## Switch to given version\n\nA custom version (e.g. `1.2.3`) for changing versions can be specified as a parameter.\n\n```bash\n❯ bin/version-manager 1.2.3\n\nCurrent version: 0.1.0\nNew version:     1.2.3\n\nDo you want to set the new version \"1.2.3\" (y/n)? y\n\n[2022-01-16 18:11:41] (info)    → Set version \"1.2.3\" to \"/home/bjoern/Development/ixno/bash-version-manager/VERSION\"\n[2022-01-16 18:11:41] (success) → Done.\n[2022-01-16 18:11:41] (info)    → Set version \"1.2.3\" to \"/home/bjoern/Development/ixno/bash-version-manager/.env\"\n[2022-01-16 18:11:41] (success) → Done.\n```\n\n## Use another working directory\n\nUsually the tool uses the current working directory. This can be changed.\n\n```bash\n❯ bin/version-manager --working-dir test --current\n\nCurrent version: 0.2.1\n\nNext major version: 1.0.0 (Use bin/version-manager --major)\nNext minor version: 0.3.0 (Use bin/version-manager --minor)\nNext patch version: 0.2.2 (Use bin/version-manager --patch)\n```\n\n## Show help\n\nShows the parameters and arguments of the tool.\n\n```bash\n❯ bin/version-manager --help\n\nversion-manager 0.1.0 (2022-01-16) - Björn Hempel \u003cbjoern@hempel.li\u003e\n\nUsage: version-manager [...options] [version]\n\n -c,    --current                     Shows the current version.\n\n -X,    --major                       Will increase the major version (x.0.0).\n -m,    --minor                       Will increase the minor version (0.x.0).\n -p,    --patch                       Will increase the patch version (0.0.x).\n\n -w,    --working-dir                 Sets the current working-dir (default: \"~/ixno/bash-version-manager\")\n\n -s,    --show-hints                  Shows some hints.\n -h,    --help                        Shows this help.\n -V,    --version                     Shows the version number.\n```\n\n## Show git hints\n\nShows some useful commands for committing to the Git repository.\n\n```bash\n❯ bin/version-manager --show-hints\n\nNow you can do the following:\n\n\n→ Edit your CHANGELOG.md file\n\n❯ vi CHANGELOG.md\n\n\n→ Usually version changes are set in the main or master branch\n\n❯ git checkout main \u0026\u0026 git pull\n\n\n→ Commit your changes to your repo\n\n❯ git add CHANGELOG.md \u0026\u0026 git commit -m \"Add version $(cat VERSION)\" \u0026\u0026 git push\n\n\n→ Tag your version\n\n❯ git tag -a \"$(cat VERSION)\" -m \"Version $(cat VERSION)\" \u0026\u0026 git push origin \"$(cat VERSION)\"\n```\n\n## Use with PHP Composer\n\n```bash\ncomposer require --dev ixnode/bash-version-manager\n```\n\n```bash\nvendor/bin/version-manager --version\n```\n\n```bash\nversion-manager 0.1.2 (2022-12-18) - Björn Hempel \u003cbjoern@hempel.li\u003e\n```\n\n### `Version` class usage\n\n```php\nuse Ixnode\\BashVersionManager\\Version;\n```\n\n```php\n$versionArray = (new Version())-\u003egetAll();\n```\n\n## Execute tests\n\nIf you want to make changes, the test mode helps to check the current changes. Test mode uses the\nfiles in the test folder:\n\n* `.env` (source file)\n* `.env.major` (comparison file with major change)\n* `.env.minor` (comparison file with minor change)\n* `.env.patch` (comparison file with patch change)\n* `VERSION` (source file)\n* `VERSION.major` (comparison file with major change)\n* `VERSION.minor` (comparison file with minor change)\n* `VERSION.patch` (comparison file with patch change)\n\n```bash\nbin/version-manager --test\n```\n\n```bash\n[2022-01-16 16:50:57] (info)    → The sha1 keys match (major).\n[2022-01-16 16:50:57] (info)    → The sha1 keys match (major).\n\n[2022-01-16 16:50:57] (info)    → The sha1 keys match (minor).\n[2022-01-16 16:50:57] (info)    → The sha1 keys match (minor).\n\n[2022-01-16 16:50:57] (info)    → The sha1 keys match (patch).\n[2022-01-16 16:50:57] (info)    → The sha1 keys match (patch).\n\n[2022-01-16 16:50:57] (success) → All tests were completed successfully.\n```\n\n## License\n\nThis tool is licensed under the MIT License - see the [LICENSE.md](/LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixnode%2Fbash-version-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fixnode%2Fbash-version-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixnode%2Fbash-version-manager/lists"}