diff options
| author | EuAndreh <eu@euandre.org> | 2021-01-22 15:06:36 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2021-01-22 15:06:36 -0300 |
| commit | 94383be5ec7792c9672a2418d46e954880999ab3 (patch) | |
| tree | 3792c3ef8e1b923716d19f6cd5c49ed8260a4d64 /bash/templates/build-aux/ci/git-pre-push.sh | |
| parent | open: Use $BROWSER over firefox (diff) | |
| download | dotfiles-94383be5ec7792c9672a2418d46e954880999ab3.tar.gz dotfiles-94383be5ec7792c9672a2418d46e954880999ab3.tar.xz | |
fake-symlinks: Allow git-pre-push.sh.in and git-pre-push.sh to coexist
Diffstat (limited to '')
| -rw-r--r-- | bash/templates/build-aux/ci/git-pre-push.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bash/templates/build-aux/ci/git-pre-push.sh b/bash/templates/build-aux/ci/git-pre-push.sh new file mode 100644 index 00000000..23839deb --- /dev/null +++ b/bash/templates/build-aux/ci/git-pre-push.sh @@ -0,0 +1,19 @@ +#!/bin/sh +set -eux + +PACKAGE="$(basename "$PWD")" +__ENABLE_CI__ LOGS_DIR="/data/ci/$PACKAGE/logs" +REMOTE_GIT_DIR="/data/git/$PACKAGE.git" + +DESCRIPTION="$(mktemp)" +if [ -f description ] +then + cp description "$DESCRIPTION" +else + git config euandreh.description > "$DESCRIPTION" +fi + +scp "$DESCRIPTION" "git.euandreh.xyz:$REMOTE_GIT_DIR/description" +__ENABLE_CI__ ssh git.euandreh.xyz mkdir -p "$LOGS_DIR" +__ENABLE_CI__ scp build-aux/ci/ci-build.sh "git.euandreh.xyz:$(dirname "$LOGS_DIR")/ci-build.sh" +__ENABLE_CI__ scp build-aux/ci/git-post-receive.sh "git.euandreh.xyz:$REMOTE_GIT_DIR/hooks/post-receive" |
