{"id":21359350,"url":"https://github.com/trendmicro/new-release-version","last_synced_at":"2025-07-13T01:31:11.103Z","repository":{"id":41984574,"uuid":"307566465","full_name":"trendmicro/new-release-version","owner":"trendmicro","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-19T13:56:28.000Z","size":2246,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-06-20T06:42:44.596Z","etag":null,"topics":["cicd","releases","semver","versioning"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trendmicro.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-27T02:43:57.000Z","updated_at":"2023-05-23T18:31:42.000Z","dependencies_parsed_at":"2023-12-19T20:06:09.219Z","dependency_job_id":"43dec9f0-f973-4293-9d20-a94f70459a39","html_url":"https://github.com/trendmicro/new-release-version","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendmicro%2Fnew-release-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendmicro%2Fnew-release-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendmicro%2Fnew-release-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendmicro%2Fnew-release-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trendmicro","download_url":"https://codeload.github.com/trendmicro/new-release-version/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225849893,"owners_count":17534058,"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":["cicd","releases","semver","versioning"],"created_at":"2024-11-22T05:27:52.839Z","updated_at":"2024-11-22T05:27:53.340Z","avatar_url":"https://github.com/trendmicro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# New Release Version\n\nForked from \u003chttps://github.com/jenkins-x-plugins/jx-release-version\u003e\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/trendmicro/new-release-version/)](https://pkg.go.dev/github.com/trendmicro/new-release-version/)\n\n`new-release-version` is a simple command that will print a new patch (or minor) version for a release.\n\nThis helps in continuous delivery if you want an automatic release when a change is merged to your main branch.  Traditional approaches mean the version is stored in a file that is checked and updated after each release.  If you want automatic releases this means you will get another release triggered from the version update resulting in a cyclic release situation.  \n\nUsing a git tag to work out the next release version is better than traditional approaches of storing it in a VERSION file or updating a project's config file.\n\nThe major and minor version of the release is determined by searching for a version identifier in a project config file, like `package.json` or `build.gradle.` See [examples](examples) for supported version files.\n\nWhen you need to bump the major or minor version of your project, simply increment the version in your project's config file and commit that to your main branch.\n\n`new-release-version -help`:\n\n```\nUsage of ./new-release-version:\n  -base-version string\n        Version to use instead of version file.\n  -debug\n        Prints debug into to console.\n  -directory string\n        Directory of git project. (default \".\")\n  -gh-owner string\n        GitHub repository owner to fetch tags from instead of the local git repo.\n  -gh-repository string\n        GitHub repository to fetch tags from instead of the local git repo.\n  -git-fetch\n        Fetch tags from remote. (default true)\n  -minor\n        Increment minor version instead of patch.\n  -same-release\n        Increment the latest base version release ignoring any releases higher than the base version release.\n  -version\n        Prints the version.\n```\n\n## Install\n\nYou must have [Git](https://git-scm.com/) installed on your system in order for `new-release-version` to work.\n\nYou can install the latest from the `main` branch\n\n    go get github.com/trendmicro/new-release-version\n\nOr install a specific version from [releases](https://github.com/trendmicro/new-release-version/releases/)\n\n## Examples\n\n```sh\n    ➜ RELEASE_VERSION=$(new-release-version)\n    ➜ echo \"New release version ${RELEASE_VERSION}\n    ➜ git tag -fa v${RELEASE_VERSION} -m 'Release version ${RELEASE_VERSION}'\n    ➜ git push origin v${RELEASE_VERSION}\n```\n\n- If your project is new or has no existing git tags then running `new-release-version` will return a default version of `0.0.1`\n\n- If your latest git tag is `1.2.3` and your version file is `1.2.0-SNAPSHOT` then `new-release-version` will return `1.2.4`\n\n- If your latest git tag is `1.2.3` and your version file is `2.0.0` then `new-release-version` will return `2.0.0`\n\n- If your latest git tag is `7.1.0` but you want to increment an older release, say `7.0.5`, use `new-release-version -base-version 7.0 -same-release` to return the next version in the `7.0` release.\n\n## Development\n\n### Prereqs\n\n- [Go](https://go.dev/)\n- [Git](https://git-scm.com/)\n\n### Build\n\n    make build\n\n### Test\n\n    make test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendmicro%2Fnew-release-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrendmicro%2Fnew-release-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendmicro%2Fnew-release-version/lists"}