A small CLI to rollback fly.io deploys
Pure shell script, zero dependency, no config required, uses the fly cli underneath.
To install(or update) the CLI, follow these steps:
- Clone the repository:
git clone https://github.com/sudhanshug16/fly-rollback-cli.git
- Navigate to the cloned directory:
cd fly-rollback-cli
- Make the install script executable:
chmod +x install.sh
- Run the install script with root permissions:
sudo ./install.sh
fly-rollback [version] [flags]
Where:
version
is the version to rollback to. It can be in the formatHEAD^n
orvN
.HEAD^n
: This will rollback to the nth version from the latest. For example,HEAD^1
will rollback to the previous version,HEAD^2
will rollback to the version before the previous one, and so on.
flags
are any extra flags that need to be passed to fly.
Example:
fly-rollback HEAD^1 --env production
This will rollback to the previous version in the production environment.
Disclaimer: Only complete releases can be rolled back to. If the release's status is not complete, the rollback will not be performed.
fly-rollback list
This will list all the releases.