https://github.com/sgehrman/pubspec_updater
A native tool to update versions in pubspec.yaml files
https://github.com/sgehrman/pubspec_updater
dart flutter yaml
Last synced: about 1 year ago
JSON representation
A native tool to update versions in pubspec.yaml files
- Host: GitHub
- URL: https://github.com/sgehrman/pubspec_updater
- Owner: sgehrman
- License: mit
- Created: 2019-12-05T06:18:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-20T20:31:48.000Z (over 3 years ago)
- Last Synced: 2025-03-27T00:54:58.958Z (about 1 year ago)
- Topics: dart, flutter, yaml
- Language: Dart
- Size: 14.6 KB
- Stars: 13
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pubspec_updater
Creates a native tool to update all package versions in pubspec.yaml
```bash
dart install.dart
```
This will copy a tool called pubspec_updater in to /home/user/bin. Make sure you have a bin dir in home and it's added to your \$PATH.
Only tested on Linux, but should work on macOS.
Send in Pull Requests if it doesn't work for you. Let me know if there is a better way to build this.
Once the tool is installed, you can go to any flutter package directory with a pubspec.yaml file and run:
This will display what it will change, but not write out the changes
```bash
pubspec_updater
```
Run with -u to actually write the pubspec.yaml
```bash
pubspec_updater -u
```
There are other flags to control how it change the versions. Use -h for help.
```bash
pubspec_updater -h
```
It will also add versions for pubs with out a version. It avoids any versions with < or >
Code is based on [https://github.com/mauriciotogneri/dapackages](https://github.com/mauriciotogneri/dapackages)
Inspired by npm-check-updates [https://github.com/tjunnone/npm-check-updates](https://github.com/tjunnone/npm-check-updates)