Skip to content

Commit

Permalink
git archive-file: change base ARCHIVE_NAME (tj#1071)
Browse files Browse the repository at this point in the history
Closes tj#1067

This makes the base ARCHIVE_NAME for `git-archive-file` to be the name
of the repo root directory instead of the name of the current directory.
  • Loading branch information
halostatue authored Sep 13, 2023
1 parent cb29c62 commit db71be5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/git-archive-file
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env bash

# extract current branch name
BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)

# get name of the most top folder of current directory, used for the
# output filename
ARCHIVE_NAME=$(basename "$PWD")
ARCHIVE_NAME=$(basename "$(git rev-parse --show-toplevel)")

if [[ $BRANCH = tags* ]]; then
BRANCH=$(git describe)
Expand Down

0 comments on commit db71be5

Please sign in to comment.