Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix creating archives in the temporary directory and not the cwd #693

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 'no-reply@lullabot.com'
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"
Loading