{"id":21553543,"url":"https://github.com/parzival-space/git-version-java","last_synced_at":"2025-07-11T01:08:36.668Z","repository":{"id":152541699,"uuid":"626309630","full_name":"parzival-space/git-version-java","owner":"parzival-space","description":"A port of the git-version tool made by Codacy written in Java with some tweaks.","archived":false,"fork":false,"pushed_at":"2024-01-11T12:12:15.000Z","size":47,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-03-18T02:40:34.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/parzival-space.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-04-11T07:59:15.000Z","updated_at":"2023-12-18T07:31:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"0cda4186-e6f0-480c-bc9a-a134374349d9","html_url":"https://github.com/parzival-space/git-version-java","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/parzival-space/git-version-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parzival-space%2Fgit-version-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parzival-space%2Fgit-version-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parzival-space%2Fgit-version-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parzival-space%2Fgit-version-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parzival-space","download_url":"https://codeload.github.com/parzival-space/git-version-java/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parzival-space%2Fgit-version-java/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264703071,"owners_count":23651891,"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-11-24T07:11:11.498Z","updated_at":"2025-07-11T01:08:36.649Z","avatar_url":"https://github.com/parzival-space.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-version-java\nA re-implementation in Java of the git-version tool made by Codacy with some tweaks.\n\nCodacy describes this project as follows:\n\u003e The goal of this tool is to have a simple versioning system that we can use to track the different releases. \n\u003e The tool prints the current version (e.g. to be used for tagging) depending on the git history and commit messages.\n\u003e \u003cbr /\u003e\n\u003e The versioning scheme is assumed to be Semver based.\n\n## Usage\nYou can display a help page by passing the `--help`, or short `-h`, argument.\n```\ngit-version v0.1.0 by Parzival\nSimple tool to automate versioning of git repositories.\n\nusage: git-version [-h] [--major-identifier \u003cregex\u003e] [--minor-identifier \u003cregex\u003e] [-n] [-p] [--release-branch \u003cname\u003e] [-s \u003cname\u003e] [--snapshot-branch\n       \u003cname\u003e] [-t \u003cpath\u003e]\n\n   -h,--help                                   Show this help page.\n      --major-identifier \u003cregex\u003e               A regex that can be used to identify commits that should bump the major version.\n                                               Default: 'breaking:.*'\n      --minor-identifier \u003cregex\u003e               A regex that can be used to identify commits that should bump the minor version.\n                                               Default: 'feature:.*'\n   -n,--no-hash                                Removes the commit hash that normally gets added to a version if you are not on the release or snapshot\n                                               branch.\n   -p,--previous-version                       Returns the last version instead of the next one.\n      --release-branch \u003cname\u003e                  The name of the release branch.\n                                               Default: main\n   -s,--suffix \u003cname\u003e                          A Suffix that will be applied to all snapshot releases.\n                                               Default: SNAPSHOT\n      --snapshot-branch \u003cname\u003e                 The name of the snapshot branch.\n                                               Default: development\n   -t,--target \u003cpath\u003e                          The path to the git repository.\n\n```\n\n## How To Version\nThis tool creates a version with the format `MAJOR.MINOR.PATCH`.\n\n_Using this tool may look something like this:_\n```bash\n$ java -jar /path/to/git-version.jar\n1.0.0\n```\n\nVersions are incremented since the last tag. \nThe patch version is incremented by default, unless there is at least one commit since the last tag, containing a minor or major identifier (defaults to `feature:` or `breaking:`) in the message.\n\nOn branches other than the release and development branch (default to `main` and `development`), the version will look something like below.\nThe commit hash can be disabled using `--no-hash`, but is enabled by default.\n```\n{MAJOR}.{MINOR}.{PATCH}-{SNAPSHOT-SUFFIX}-{COMMIT-HASH}\n```\n\nOn the development branch the format is the following:\n```\n{MAJOR}.{MINOR}.{PATCH}-{SNAPSHOT-SUFFIX}\n```\n\n### Examples\n_Example:_\n```\n---A---B---C \u003c= Main (tag: 1.0.1)          L \u003c= Main (git-version: 1.0.2)\n            \\                             /\n             D---E---F---G---H---I---J---K \u003c= feature/cool-feature (git-version: 1.0.2-SNAPSHOT-9247756d)\n```\n\n_Example2 (with dev branch):_\n```\n---A---B---C \u003c= Main (tag: 1.0.1)          L \u003c= Main (git-version: 1.0.2)\n            \\                             / \u003c= Fast-forward merges to master (same commit id)\n             C                           L \u003c= Dev (git-version: 1.0.2-SNAPSHOT)\n              \\                         /\n               E---F---G---H---I---J---K \u003c= feature/cool-feature (git-version: 1.0.2-SNAPSHOT-9247756d)\n```\n\n_Example3 (with breaking message):_\n```\n---A---B---C \u003c= Main (tag: 1.0.1)          L \u003c= Main (git-version: 2.0.0)\n            \\                             /\n             D---E---F---G---H---I---J---K \u003c= feature/cool-feature (git-version: 1.0.2-SNAPSHOT-9247756d)\n                                         \\\\\n                                          message: \"breaking: added incompatible cool new feature\"\n```\n\n## Requirements\nBefore running this app, ensure you have the following requirements:\n* Java 17 or above.\n  You can download the latest LTS binaries from [Adoptium](https://adoptium.net/).\n\n\n## Build It Yourself\nTo compile the artifact locally, you need to have the following requirements setup:\n* Java 17 JDK or above\n* [Apache Maven](https://maven.apache.org/)\n\nNow compile the project using:\n```bash\n$ mvn package\n```\n\n## Credits\nThis was originally intended as a direct port of the [git-version](https://github.com/codacy/git-version) project by [Codacy](https://github.com/codacy).\nLater I also added some minor tweaks, like being able to toggle the commit hash.\n\nI also want to mention the [GitVersion](https://github.com/GitTools/GitVersion) project, from wich [Codacy](https://github.com/codacy) took inspiration from.\n\n## Contributing\nDo you want to improve this project?\nYou are more than welcome to contribute.\n\nTo contribute, please follow these steps:\n1. [Fork the Repository](https://github.com/parzival-space/git-version-java/fork)\n2. Create a branch with a descriptive name for your feature or bugfix (ex: feature/super-cool-feature)\n3. Submit a pull request\n4. Profit!\n\n## License\nThis project is distributed under the GNU GPL-3.0 license. \nSee ``LICENSE`` for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparzival-space%2Fgit-version-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparzival-space%2Fgit-version-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparzival-space%2Fgit-version-java/lists"}