diff --git a/Taskfile.yml b/Taskfile.yml index 6607b8a60..872bf9900 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -90,3 +90,12 @@ tasks: desc: Identify legacy and deprecated lines cmds: - grep -rnw "\(LEGACY\|Deprecated\)" internal + + drop-test-db: + desc: Drop the test database + cmds: + - | + for dbname in $(psql -Xc "copy (select datname from pg_database where datname like 'gogs-%') to stdout"); do + dropdb "$dbname" + echo "dropped $dbname" + done