From ad742a782f874936d61469837e3f24362cb829ab Mon Sep 17 00:00:00 2001 From: yuuki <> Date: Tue, 9 Apr 2024 22:54:08 +0000 Subject: [PATCH] =?UTF-8?q?GC=E3=82=92=E5=88=A5=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=81=AB=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clean.sh | 7 +++++++ pull.sh | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 clean.sh 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 が更新されました"