mirror of
https://github.com/sobolevn/git-secret
synced 2024-10-31 21:20:29 +00:00
10fa2a7be2
* Tempfile and temp directory cleanups Add comments about mktemp on different platforms Be more careful about tempfile cleanups Don't use find to locate files to cleanup Use shorter SECRETS_EXTENSION and SECRETS_DIR env settings in tests Set TMPDIR in tests again Show DESTDIR used when testing git-secret install Change filename passed to mktemp -t in tests
21 lines
402 B
Bash
21 lines
402 B
Bash
#!/usr/bin/env bats
|
|
|
|
: "${TMPDIR:=/tmp}"
|
|
|
|
INSTALL_BASE="${TMPDIR}/git-secret-test-install"
|
|
|
|
@test "install git-secret to DESTDIR='$INSTALL_BASE'" {
|
|
|
|
rm -f "${INSTALL_BASE}/usr/bin/git-secret"
|
|
|
|
cd $SECRET_PROJECT_ROOT
|
|
|
|
# set DESTDIR for this command and 'run' make install
|
|
DESTDIR="${INSTALL_BASE}" run make install
|
|
|
|
[ -x "${INSTALL_BASE}/usr/bin/git-secret" ]
|
|
|
|
rm -rf "${INSTALL_BASE}"
|
|
}
|
|
|