aboutsummaryrefslogtreecommitdiff
path: root/aux/ci/git-pre-push.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-07-15 14:56:58 -0300
committerEuAndreh <eu@euandre.org>2021-07-15 15:22:12 -0300
commit42354876de823f52a431eac900d360c074c6198d (patch)
tree0b640a85a4375d51c01b9f05937eb562e776a5bf /aux/ci/git-pre-push.sh
parentTODOs.md: Add #task-f4807694-2187-5cb5-115e-c5970a052f1f (diff)
downloadgit-permalink-42354876de823f52a431eac900d360c074c6198d.tar.gz
git-permalink-42354876de823f52a431eac900d360c074c6198d.tar.xz
aux/lib.sh: Add mkstemp and mkdtemp, and copy uuid over
The tests were relying on the unspecified and non-standartized behaviour of "mktemp". Now they use "mkstemp()", a shim sh function to provide the expected behaviour, and an accompanying "mkdtemp()" function is also defined. To further decouple from specific implementations and OS-behaviours and quirks, a aux/lib.sh file containing both those functions was added. Its purpose is to also allow code under aux/ to not depend on specific behaviour. "mkdtemp()" had to be replicated in aux/ci/ci-build.sh, since it runs outside the repository.
Diffstat (limited to 'aux/ci/git-pre-push.sh')
-rwxr-xr-xaux/ci/git-pre-push.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/aux/ci/git-pre-push.sh b/aux/ci/git-pre-push.sh
index cccd6e5..4fcf733 100755
--- a/aux/ci/git-pre-push.sh
+++ b/aux/ci/git-pre-push.sh
@@ -2,12 +2,13 @@
set -eux
TLD="$(cat aux/tld.txt)"
+. aux/lib.sh
PROJECT="$(basename "$PWD")"
LOGS_DIR="/opt/ci/$PROJECT/logs"
REMOTE_GIT_DIR="/srv/git/$PROJECT.git"
-DESCRIPTION="$(mktemp)"
+DESCRIPTION="$(mkstemp)"
if [ -f description ]
then
cp description "$DESCRIPTION"