diff --git a/clean.sh b/clean.sh new file mode 100644 index 000000000..ca564c241 --- /dev/null +++ b/clean.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +docker exec -i --user=git forgejo /bin/bash -c "cd /data/git/repositories/yuuki/taiko-mongo-realtime.git && git reflog expire --expire-unreachable=now --all" +docker exec -i --user=git forgejo /bin/bash -c "cd /data/git/repositories/yuuki/taiko-mongo-realtime.git && git gc --aggressive --prune=now" + +git reflog expire --expire-unreachable=now --all +git gc --aggressive --prune=now diff --git a/pull.sh b/pull.sh index 923890873..aeb82a8bc 100644 --- a/pull.sh +++ b/pull.sh @@ -4,12 +4,6 @@ docker exec -i taiko-mongo mongoexport --db taiko --collection users --out /dev/ docker exec -i taiko-mongo mongoexport --db taiko --collection songs --out /dev/stdout | sort -n > songs.json docker exec -i taiko-mongo mongoexport --db taiko --collection scores --out /dev/stdout | sort -n > scores.json -docker exec -i --user=git forgejo /bin/bash -c "cd /data/git/repositories/yuuki/taiko-mongo-realtime.git && git reflog expire --expire-unreachable=now --all" -docker exec -i --user=git forgejo /bin/bash -c "cd /data/git/repositories/yuuki/taiko-mongo-realtime.git && git gc --aggressive --prune=now" - -git reflog expire --expire-unreachable=now --all -git gc --aggressive --prune=now - git add *.json changed=$(git diff --name-only --cached | paste -s -d " ") git commit --author="BOT " -m "$changed が更新されました"