{"id":20254795,"url":"https://github.com/chippyash/semantic-version-updater","last_synced_at":"2026-05-12T14:09:00.649Z","repository":{"id":62501837,"uuid":"96803580","full_name":"chippyash/semantic-version-updater","owner":"chippyash","description":"PHP utility program to enable version updating in the build chain","archived":false,"fork":false,"pushed_at":"2021-05-22T10:45:51.000Z","size":2293,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-01T14:53:24.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chippyash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-10T17:26:17.000Z","updated_at":"2021-05-22T10:45:54.000Z","dependencies_parsed_at":"2022-11-02T12:01:33.029Z","dependency_job_id":null,"html_url":"https://github.com/chippyash/semantic-version-updater","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/chippyash/semantic-version-updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chippyash%2Fsemantic-version-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chippyash%2Fsemantic-version-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chippyash%2Fsemantic-version-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chippyash%2Fsemantic-version-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chippyash","download_url":"https://codeload.github.com/chippyash/semantic-version-updater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chippyash%2Fsemantic-version-updater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32942329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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-14T10:34:57.238Z","updated_at":"2026-05-12T14:09:00.619Z","avatar_url":"https://github.com/chippyash.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Semantic Version Updater\n\nBuild chain utility to update the semantic version for a PHP package\n\n## PHP Version support\nWith the inexorable withdrawal of upstream library support for PHP\u003cV8, I've\nnow also decided to remove support for \u003cV8. If you still need \u003cV8 support\nuse a tagged version \u003c1 and build the package yourself. V1+ is PHP8 only.\n\n## Quality Assurance\n\n![PHP 8](https://img.shields.io/badge/PHP-8-blue.svg)\n[![Build Status](https://travis-ci.org/chippyash/semantic-version-updater.svg)](https://travis-ci.org/chippyash/semantic-version-updater)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/e2dad65c6556353dae4b/test_coverage)](https://codeclimate.com/github/chippyash/semantic-version-updater/test_coverage)\n\nThe above badges represent the current development branch.  As a rule, I don't push\n to GitHub unless tests, coverage and usability are acceptable.  This may not be\n true for short periods of time; on holiday, need code for some other downstream\n project etc.  If you need stable code, use a tagged version.\n \nSee the [Test Contract](https://github.com/chippyash/semantic-version-updater/blob/master/docs/Test-Contract.md)\n\n## How\n\n### Initialisation\n\nFor a new package\n\nadd `\"chippyash/semantic-version-updater\":\"*\"` to your dev-requires section of the composer.json file\n\nrun `composer update`\n\nrun `vendor/bin/vupdate init` to create a new VERSION file in the root of your project\n\nrun\n\n\u003cpre\u003e\n\n    git commit -am\"add vupdate\"\n    \n    git tag 0.0.0\n    \n    git push origin master --tags\n\u003c/pre\u003e\n\n### Manually updating the version and git tag\n\nDuring initial development, you'll want to have your package tagged at various points.  You can keep your git tag version \nand the version contained in the VERSION file in sync with\n\n\u003cpre\u003e\nbin/vupdate \u0026\u0026 cat VERSION | xargs git tag\n\u003c/pre\u003e\n\nDon't forget to push your tags to remote repo.\n\nOnce you have finished initial development and you think you are good to go,\nyou can tag you package at its first 'real' release version.  You can\neither run `bin/vupdate -pbcbreak` to update the major (M.n.n) part of\nthe version number, or `bin/vupdate -o 1.0.0` to force the version.  A one liner would be\n\n\u003cpre\u003e\nbin/vupdate -pbcbreak \u0026\u0026 cat VERSION | xargs git tag \u0026\u0026 git commit -am\"First release\" \u0026\u0026 git push origin master --tags\n\u003c/pre\u003e\n\nUse `bin/vupdate -h` to see the help screen.\n\nUse `bin/vupdate --version` for command version number.\n\n### Employing into your build chain\n\nThe real purpose of the utility is to get it used in the build chain,\nupdating the tag, pushing to git and then updating the Satis/Composer\n(or other repo) to tell it that a new version is available.\n\nDownload this repo as a zip and extract it. Move/copy the bin/vupdate\nfile to somewhere on your PATH, e.g. /usr/local/bin/vupdate.  You can also do\nthis if you just want the executable phar on your local machine to be\nglobally available.\n\nHere is a jenkins job that we use in our build chain to update the version dependent\non the branch name prefix:\n\n\u003cpre\u003e\nVERSIONER=/usr/local/bin/vupdate\nGIT=git\n\ncd \"${workingDir}\";\n${GIT} checkout ${gitBranch};\nlastCommit=$(git log --branches | grep 'Merge pull request.* to master' | head -1)\n\nif [[ $lastCommit == *\"feature/\"* ]] || [[ $lastCommit == *\"release/\"* ]]\nthen\n        ${VERSIONER} -p feature;\n        verType=\"Feature\";\nelse\n        ${VERSIONER};\n        verType=\"Patch\";\nfi;\n\n\n${GIT} commit -am\"CD $verType Version update: $lastCommit\";\ncat VERSION | xargs ${GIT} tag;\n${GIT} push origin ${gitBranch} --tags;\n\u003c/pre\u003e\n\nThe $workingDir and $gitBranch parameters are sent to the job from the main build\njob.  $gitBranch defaults to 'master';\n\n## Development\n\nClone the repo as normal.\n\nCreate a feature branch\n\nrun `composer update` to pull in the external libraries.\n\nCommit your changes as normal and push to repo and make a pull request.\n \n### The make file\n\nRunning `make` will rebuild the `bin/vupdate` phar file and push the changes to the repo.\nAs such, it is only of any use to you if you have write access on the code repo.\n\nYou can run `make build` to just build the `bin/vupdate`\n\n### Notes\nIf you get `creating archive \"/var/lib/jenkins/jobs/ci-version-updater-builder/workspace/bin/vupdate.phar\"\ndisabled by the php.ini setting phar.readonly `\nor something similar when using the make build tools, edit your php cli\nini file and set `phar.readonly = Off`.\n\n## Acknowledgments\n\nI first wrote the vupdate.php script some years ago.  At that time it relied on the \n'herrera-io/version' package from [Kevin Herrara](https://packagist.org/users/kherge/).  He's since abandoned that package, so\nI've included his original code in the source of this package.  It still works just fine.\nYou can find it in the 'src' directory, along with his original tests in the 'test'\ndirectory. The Test Contract can be found at `docs/Test-Contract.md`. He has\na permissive license on his code, so feel free to use this package\nto get access to the original code if you need it in some other application.\n\nThe build routine managed by the Makefile relies on [Box](https://box-project.github.io/box2/).\nThere is a box phar distribution in the bin directory which will be used\nby the makefile.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchippyash%2Fsemantic-version-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchippyash%2Fsemantic-version-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchippyash%2Fsemantic-version-updater/lists"}