Skip to content

Commit

Permalink
Fix creating archives in the temporary directory and not the cwd (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
deviantintegral authored Sep 23, 2024
1 parent 09996db commit cdd6302
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tasks/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ tasks:
TMP_DIR=$(mktemp -d)
cp -Rp . $TMP_DIR
if [ ! -f ".drainpipeignore" ]; then echo ".drainpipeignore does not exist" && touch $TMP_DIR/.drainpipeignore; fi
DESTINATION=$(realpath {{ .o }})
cd $TMP_DIR
{{ .PREPARE_DIRECTORY }}
git config user.email '[email protected]'
git config user.name 'Lullabot Drainpipe'
git commit --quiet --message "Initial commit" --no-gpg-sign
git config tar.tar.xz.command "xz -c"
git config tar.tar.bz2.command "bzip2 -c"
git archive -o {{.o}} HEAD
test -f {{.o}}
git -C $TMP_DIR archive -o "$DESTINATION" HEAD
test -f "$DESTINATION"

0 comments on commit cdd6302

Please sign in to comment.