diff options
author | EuAndreh <eu@euandre.org> | 2021-06-11 23:55:44 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-11 23:55:44 -0300 |
commit | 2be10d5b2df987131497c1d9fd7f93df4c6d827e (patch) | |
tree | 09c50d69f942c1385dcd459690f5a8849793ee31 /aux/ci/git-pre-push.sh | |
parent | TODOs.md: Add #task-39e71afe-4ac9-4c3d-97e4-9ac41f826089 (diff) | |
download | gistatic-2be10d5b2df987131497c1d9fd7f93df4c6d827e.tar.gz gistatic-2be10d5b2df987131497c1d9fd7f93df4c6d827e.tar.xz |
aux/: Update files
Diffstat (limited to 'aux/ci/git-pre-push.sh')
-rwxr-xr-x | aux/ci/git-pre-push.sh | 14 |
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" |