From ecba33e408de7f683a0104c356eb868fbe57b275 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 8 Jul 2021 18:47:10 +0100 Subject: [PATCH] Add script --- gitlab-dater.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 gitlab-dater.sh diff --git a/gitlab-dater.sh b/gitlab-dater.sh new file mode 100755 index 0000000..5a7b95c --- /dev/null +++ b/gitlab-dater.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e + +REPO_ID=$1 +DATE=$2 + +SQL="UPDATE projects SET updated_at = '$DATE', last_repository_updated_at = '$DATE', last_activity_at = '$DATE' WHERE id = $REPO_ID;" + +echo "$SQL" + +gitlab-psql -c "$SQL"