This is a Python script that automates the process of upgrading the version of a Flutter project. It updates the version in the pubspec.yaml file, commits the changes, tags the release, and pushes the changes to the remote repository.
- Automatically increments the major, minor, or patch version of your Flutter project.
- Commits the version change to your Git repository.
- Tags the new version in your Git repository.
- Pushes the changes to your remote Git repository.
- Ensure you have Python 3 installed on your machine.
- Clone this repository or download the
fvupgrader.pyfile. - Navigate to the directory containing the
fvupgrader.pyfile in your terminal. - Run the script with the
--pathargument pointing to your Flutter project:
python fvupgrader.py --path /path/to/flutter/projectReplace /path/to/flutter/project with the actual path to your Flutter project. If you don't provide the --path argument, the script will use the current directory (.) as the default.
You can download the fvupgrader.py script directly from the repository:
curl -O https://raw.githubusercontent.com/emiliodallatorre/cepheus-fvupgrader-python/main/fvupgrader.pyTo install it, move the downloaded script to /usr/local/bin:
sudo mv fvupgrader.py /usr/local/bin/fvupgraderAfter moving the script, you can run it from anywhere on your system by typing fvupgrader in your terminal.
- Python 3
- Git
This script assumes that your Flutter project's version follows the pattern major.minor.patch+build in the pubspec.yaml file.