{"id":21247457,"url":"https://github.com/audrow/update-ros-pkg-versions","last_synced_at":"2025-03-15T05:15:07.481Z","repository":{"id":44996828,"uuid":"437010652","full_name":"audrow/update-ros-pkg-versions","owner":"audrow","description":"View, bump, and set package versions in ROS package.xml, changelogs, and setup.py files","archived":false,"fork":false,"pushed_at":"2023-04-25T18:09:48.000Z","size":75,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-11T04:38:03.037Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/audrow.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}},"created_at":"2021-12-10T14:39:34.000Z","updated_at":"2022-01-18T21:05:54.000Z","dependencies_parsed_at":"2022-09-24T21:41:47.002Z","dependency_job_id":null,"html_url":"https://github.com/audrow/update-ros-pkg-versions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audrow%2Fupdate-ros-pkg-versions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audrow%2Fupdate-ros-pkg-versions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audrow%2Fupdate-ros-pkg-versions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audrow%2Fupdate-ros-pkg-versions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/audrow","download_url":"https://codeload.github.com/audrow/update-ros-pkg-versions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243685585,"owners_count":20330982,"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-21T02:34:38.190Z","updated_at":"2025-03-15T05:15:07.461Z","avatar_url":"https://github.com/audrow.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nA script for viewing, bumping, and setting package versions in ROS 2\n`package.xml`, `setup.py`, and `CHANGELOG.rst` files. It also tells you if your\nrepo has different versions between packages and can create commits and tags for\nthe new versions.\n\n- [Setup](#setup)\n- [Usage](#usage)\n  - [Available Commands](#available-commands)\n  - [Suggested Workflow](#suggested-workflow)\n    - [Bumping a ROS Repository's Version](#bumping-a-ros-repositorys-version)\n    - [Updating a Repository with Inconsistent Package Versions](#updating-a-repository-with-inconsistent-package-versions)\n- [Tests](#tests)\n\n## Setup\n\nThis project depends on [Deno](https://deno.land/). You can install Deno with\nthe following command:\n\n```bash\n# Mac / Linux\ncurl -fsSL https://deno.land/install.sh | sh\n```\n\n```powershell\n# Windows\niwr https://deno.land/install.ps1 -useb | iex\n```\n\nThe easiest way to work with this script is to install it with Deno. To do this,\nclone this repository and run the following command:\n\n```bash\nmake install\n```\n\nYou can use `make uninstall` to uninstall this script.\n\nAfterwards, you can run the script with `update-ros-pkg-versions`.\n\n## Usage\n\n### Available Commands\n\nUse `-h` or `--help` to access help. From here you can see the available\ncommands and their options. You can also use help with subcommands.\n\n```\nupdate-ros-pkg-versions --help\nupdate-ros-pkg-versions bump -h\n```\n\nYou can go into `update-ros-pkg-versions/src/file_system/example_package` for an\nexample package to test out commands on.\n\nYou can get the current version with the following command:\n\n```bash\n# cd update-ros-pkg-versions/src/file_system/example_package\n$ update-ros-pkg-versions get\nCurrent Version: 0.11.2\n```\n\nIf the package has inconsistent versioning, you will see an error like the\nfollowing:\n\n```bash\n$ update-ros-pkg-versions get\nCurrent Version: 0.11.2\n\nFiles that were not updated:\n\n* ros1_pkg/package.xml: Cannot set version for ROS 1 file: ros1_pkg/package.xml\n* ros1_pkg/setup.py: Cannot set version for ROS 1 file: ros1_pkg/setup.py\n```\n\nIf you have inconsistent versioning (of if you just know the version you want),\nyou can set all the versions at once with the `set` command:\n\n```bash\n$ update-ros-pkg-versions set 1.2.3\nDone!\n$ update-ros-pkg-versions get\nCurrent Version: 1.2.3\n```\n\nNote that you can use `--tag` to commit and tag the repo after making a bump.\n\n```bash\n$ update-ros-pkg-versions set 1.2.3 --tag\nDone!\n```\n\nOtherwise, you can bump the version (note, `--tag` is also an option here):\n\n```bash\n$ update-ros-pkg-versions bump --type minor # patch is default\nDone!\n$ update-ros-pkg-versions get\nupdate-ros-pkg-versions get Current Version: 0.12.0\n```\n\nIf you've updated the version and would like to create a commit and tag (and you\ndidn't do it from `set` or `bump` with the `--tag` flag), you can run the\nfollowing command:\n\n```bash\n$ update-ros-pkg-versions tag\nDone!\n```\n\nNote that the commands have an `--skip-setup-py` option. This is useful when a\npackage hasn't add a version tag to one or more `setup.py` files.\n\nAlso, ROS 1 packages will be skipped. This program skips any files that mention\n`catkin`.\n\n### Suggested Workflow\n\n#### Bumping a ROS Repository's Version\n\n1. Run `catkin_generate_changelog`\n2. Check and edit the changelog\n3. Bump the version, for example:\n\n   ```bash\n   update-ros-pkg-versions bump --type minor # patch is default\n   ```\n\n4. Create a commit and tag with\n\n   ```bash\n   $ update-ros-pkg-versions tag\n   ```\n\n5. Push the new tag and commit:\n\n   ```bash\n   git push --tags\n   ```\n\nNote that step 3 and 4 can be consolidated into the following command:\n\n```bash\nupdate-ros-pkg-versions bump --type minor --tag\n```\n\n#### Updating a Repository with Inconsistent Package Versions\n\nThis may occur, for example, if a previous tag was made without updating the\n`setup.py` files.\n\n1. Run `catkin_generate_changelog`\n2. Check and edit the changelog\n3. Try to bump the version, but an error will occur. Use this error to get the\n   current versions used.\n   ```bash\n   $ update-ros-pkg-versions bump\n   error: Uncaught (in promise) Error: Version is not consistent - got the following versions: 0.11.2, 0.11.3\n   ```\n4. Set the version to the desired new version, for example:\n\n   ```bash\n   update-ros-pkg-versions set 0.11.4\n   ```\n\n5. Create a commit and tag with\n\n   ```bash\n   $ update-ros-pkg-versions tag\n   ```\n\n6. Push the new tag and commit:\n\n   ```bash\n   git push --tags\n   ```\n\nNote that step 4 and 5 can be consolidated into the following command:\n\n```bash\nupdate-ros-pkg-versions set 0.11.4 --tag\n```\n\n## Tests\n\nYou can test this program with the following command:\n\n```bash\nmake test # or make test-all to run the tests, linter, and formatter\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudrow%2Fupdate-ros-pkg-versions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faudrow%2Fupdate-ros-pkg-versions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudrow%2Fupdate-ros-pkg-versions/lists"}