{"id":25424971,"url":"https://github.com/pxbunny/update-tags-script","last_synced_at":"2025-10-31T15:30:25.684Z","repository":{"id":187964487,"uuid":"677868004","full_name":"dae-ne/update-tags-script","owner":"dae-ne","description":"Script simplifying a release version (git tag) bump","archived":false,"fork":false,"pushed_at":"2023-12-27T18:41:52.000Z","size":24,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-27T21:17:20.367Z","etag":null,"topics":["bash","script","tags"],"latest_commit_sha":null,"homepage":"","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/dae-ne.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}},"created_at":"2023-08-12T23:02:53.000Z","updated_at":"2023-12-27T18:41:57.000Z","dependencies_parsed_at":"2023-08-13T02:06:03.330Z","dependency_job_id":"542c2d33-736a-4926-aab1-d51918db6ba8","html_url":"https://github.com/dae-ne/update-tags-script","commit_stats":null,"previous_names":["dae-ne/update-tags-script"],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dae-ne%2Fupdate-tags-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dae-ne%2Fupdate-tags-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dae-ne%2Fupdate-tags-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dae-ne%2Fupdate-tags-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dae-ne","download_url":"https://codeload.github.com/dae-ne/update-tags-script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239207609,"owners_count":19600022,"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","script","tags"],"created_at":"2025-02-16T23:18:35.557Z","updated_at":"2025-10-31T15:30:25.619Z","avatar_url":"https://github.com/dae-ne.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Update tags script\n\n\u003e :warning: **this script will remove all your local tags** and replace them with tags from a remote repository.\n\nThe script simplifies updating tags in a repository. Searches for the latest version (git tag) and adds a new tag with the next version number. It lets the user choose the type of version number change (major, minor, patch).\n\nVersion number is based on [Semantic Versioning](https://semver.org/). For now works only for format `vX.Y.Z` where `X`, `Y`, and `Z` are major, minor, and patch version numbers respectively.\n\n## Example\n\n```\n$ ./update_tags.sh\n\nFetching tags...\nCurrent version: v1.0.1\n\n1) v1.0.2\n2) v1.1.0\n3) v2.0.0\n4) quit\nSelect the new version: 1\n```\n\nIn this example, the script found the latest version `v1.0.1` and proposed three options for the new version number. Users can choose one of them, or quit the script. If the user chooses the first option, the script will add a new tag `v1.0.2` to the repository. It will also update `v1.0` and `v1` to point to the new tag.\n\nA version can also be specified using the `-v` option. For example: `./update_tags.sh -v v1.0.2`. It will break if the specified version already exists, can be used to create an initial tag, e.g. `v1.0.0` (`v0.0.0` is default).\n\n## Flags\n\n- `-v` - specify the version number to add (e.g. `v1.0.2`)\n- `-t` - specify the type of version number change (major, minor, patch)\n- `-p` - push to remote repository\n- `-f` - force push to remote repository\n\nExamples:\n\n```bash\n./update_tags.sh -v v1.0.2\n./update_tags.sh -t patch\n./update_tags.sh -p\n./update_tags.sh -f\n./update_tags.sh -t patch -p\n```\n\n## GitHub Actions example\n\n```yaml\nname: Update tags\n\non:\n  workflow_dispatch:\n    inputs:\n      version:\n        description: 'specific version'\n        required: false\n        type: string\n      update-type:\n        description: 'version update type'\n        required: false\n        default: 'patch'\n        type: choice\n        options:\n          - patch\n          - minor\n          - major\n\njobs:\n  update-tags:\n    permissions:\n      contents: write\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          submodules: true\n      - name: Set up Git\n        run: |\n          git config user.email '${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com'\n          git config user.name '${GITHUB_ACTOR}'\n      - name: Add permissions\n        run: |\n          chmod +x update-tags-script/update_tags.sh\n      - name: Run script\n        run: |\n          if [ -z \"${{ github.event.inputs.version }}\" ]; then\n            update-tags-script/update_tags.sh -f -t ${{ github.event.inputs.update-type }}\n          else\n            update-tags-script/update_tags.sh -f -v ${{ github.event.inputs.version }} -t ${{ github.event.inputs.update-type }}\n          fi\n        shell: bash\n```\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpxbunny%2Fupdate-tags-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpxbunny%2Fupdate-tags-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpxbunny%2Fupdate-tags-script/lists"}