aboutsummaryrefslogtreecommitdiff
path: root/aux/ci/git-pre-push.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-07 21:42:08 -0300
committerEuAndreh <eu@euandre.org>2021-06-07 21:42:08 -0300
commit849ccbba56f7f12f983bcbb2a6cfdd04329fe2e4 (patch)
treeda07e25e8538d952e6202793665a939f28083e3e /aux/ci/git-pre-push.sh
parentUpdate link to project websites (diff)
downloadeuandre.org-849ccbba56f7f12f983bcbb2a6cfdd04329fe2e4.tar.gz
euandre.org-849ccbba56f7f12f983bcbb2a6cfdd04329fe2e4.tar.xz
Update files under aux/
Diffstat (limited to '')
-rwxr-xr-xaux/ci/git-pre-push.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/aux/ci/git-pre-push.sh b/aux/ci/git-pre-push.sh
index 5546cb2..e73b9b8 100755
--- a/aux/ci/git-pre-push.sh
+++ b/aux/ci/git-pre-push.sh
@@ -1,6 +1,8 @@
#!/bin/sh
set -eux
+TLD="$(cat aux/tld.txt)"
+
PACKAGE="$(basename "$PWD")"
LOGS_DIR="/opt/ci/$PACKAGE/logs"
REMOTE_GIT_DIR="/srv/git/$PACKAGE.git"
@@ -8,12 +10,12 @@ REMOTE_GIT_DIR="/srv/git/$PACKAGE.git"
DESCRIPTION="$(mktemp)"
if [ -f description ]
then
- cp description "$DESCRIPTION"
+ cp description "$DESCRIPTION"
else
- git config euandreh.description > "$DESCRIPTION"
+ git config euandreh.description > "$DESCRIPTION"
fi
-scp "$DESCRIPTION" "git.euandreh.xyz:$REMOTE_GIT_DIR/description"
-ssh git.euandreh.xyz mkdir -p "$LOGS_DIR"
-scp aux/ci/ci-build.sh "git.euandreh.xyz:$(dirname "$LOGS_DIR")/ci-build.sh"
-scp aux/ci/git-post-receive.sh "git.euandreh.xyz:$REMOTE_GIT_DIR/hooks/post-receive"
+scp "$DESCRIPTION" "$TLD:$REMOTE_GIT_DIR/description"
+ssh "$TLD" mkdir -p "$LOGS_DIR"
+scp aux/ci/ci-build.sh "$TLD:$(dirname "$LOGS_DIR")/ci-build.sh"
+scp aux/ci/git-post-receive.sh "$TLD:$REMOTE_GIT_DIR/hooks/post-receive"