summaryrefslogtreecommitdiff
path: root/app-admin/github-backup-utils/files/github-backup-utils-tarball-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/github-backup-utils/files/github-backup-utils-tarball-fix.patch')
-rw-r--r--app-admin/github-backup-utils/files/github-backup-utils-tarball-fix.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/app-admin/github-backup-utils/files/github-backup-utils-tarball-fix.patch b/app-admin/github-backup-utils/files/github-backup-utils-tarball-fix.patch
new file mode 100644
index 000000000000..b0f0b8de3140
--- /dev/null
+++ b/app-admin/github-backup-utils/files/github-backup-utils-tarball-fix.patch
@@ -0,0 +1,39 @@
+commit ef6709b5e3510a7d0bcf0db91dbf5af5bc27b001
+Author: Austin English <austinenglish@gmail.com>
+Date: Tue Nov 28 16:36:39 2017 -0600
+
+ test/test-ghe-backup.sh: skip test if not in a git checkout
+
+diff --git a/test/test-ghe-backup.sh b/test/test-ghe-backup.sh
+index 296429e..08bced2 100755
+--- a/test/test-ghe-backup.sh
++++ b/test/test-ghe-backup.sh
+@@ -475,14 +475,20 @@ begin_test "ghe-backup stores version when not run from a clone"
+ # Make sure this doesn't exist
+ rm -f "$GHE_REMOTE_DATA_USER_DIR/common/backup-utils-version"
+
+- tmpdir=$(mktemp -d $TRASHDIR/foo.XXXXXX)
+- git clone $ROOTDIR $tmpdir/backup-utils
+- cd $tmpdir/backup-utils
+- rm -rf .git
+- ./bin/ghe-backup
+-
+- # verify that ghe-backup wrote its version information to the host
+- [ -f "$GHE_REMOTE_DATA_USER_DIR/common/backup-utils-version" ]
++ tmpdir=$(mktemp -d "$TRASHDIR/foo.XXXXXX")
++
++ # If user is running the tests extracted from a release tarball, git clone will fail.
++ if GIT_DIR="$ROOTDIR/.git" git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
++ git clone "$ROOTDIR" "$tmpdir/backup-utils"
++ cd "$tmpdir/backup-utils"
++ rm -rf .git
++ ./bin/ghe-backup
++
++ # Verify that ghe-backup wrote its version information to the host
++ [ -f "$GHE_REMOTE_DATA_USER_DIR/common/backup-utils-version" ]
++ else
++ echo ".git directory not found, skipping ghe-backup not from a clone test"
++ fi
+ )
+ end_test
+