Skip to content

Commit 072f5e1

Browse files
committed
Raise error if the repo slug ends in ".git"
If the pom gives the scm connection as ".../project.git" instead of ".../project" then 'travis encrypt' fails with an unhelpful error message. This prints something more helpful.
1 parent 8e79f3b commit 072f5e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

travisify.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ process() {
6868
# -- Git sanity checks --
6969
repoSlug=$(xmllint --xpath '//*[local-name()="project"]/*[local-name()="scm"]/*[local-name()="connection"]' pom.xml|sed 's_.*github.com[:/]\(.*\)<.*_\1_')
7070
test "$repoSlug" && info "Repository = $repoSlug" || die 'Could not determine GitHub repository slug'
71+
[[ "$repoSlug" == *.git ]] && die 'GitHub repository slug ('$repoSlug') ends in ".git". Please fix the pom'
7172
git fetch >/dev/null
7273
git diff-index --quiet HEAD -- || die "Dirty working copy"
7374
branch=$(git rev-parse --abbrev-ref HEAD)

0 commit comments

Comments
 (0)