Skip to content

Instantly share code, notes, and snippets.

@EarthmanT
Last active January 20, 2022 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EarthmanT/dfdc81cfde51aca3cf7a31bc053398ea to your computer and use it in GitHub Desktop.
Save EarthmanT/dfdc81cfde51aca3cf7a31bc053398ea to your computer and use it in GitHub Desktop.
alias jqids="jq -r '.[].id'"
xplugins () {
for plugin in `cfy plugins list --json | jqids`;
do cfy plugins delete $plugin;
done
}
xexec () {
for deployment in `cfy deployments list --json | jqids`;
do cfy uninstall -p ignore_failure=true $deployment
done
}
xdep () {
for deployment in `cfy deployments list --json | jqids`;
do cfy deployments delete $deployment
done
}
xblue () {
for blueprint in `cfy blueprints list --json | jqids`;
do cfy blueprints delete $blueprint
done
}
getpluginbyname () {
cfy plugins list --json | jq -c --arg var $1 '.[] | select( .package_name | contains($var))'
}
getpluginids () {
getpluginbyname $1 | jq -r '.id'
}
xplugin () {
for plugin in `getpluginids $1`;
do cfy plugins delete $plugin
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment