Skip to content
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
6 changes: 3 additions & 3 deletions travisify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ process() {
cd "$1"

# -- Git sanity checks --
repoSlug=$(git remote -v | grep origin | head -n1 | sed 's/.*github.com.\([^ ]*\) .*/\1/' | sed 's/\.git$//')
repoSlug=$(grep '<connection>' pom.xml 2>/dev/null | sed 's/[^>]*>//' | sed 's/<.*//' | cut -d'/' -f4,5)
test "$repoSlug" && info "Repository = $repoSlug" || die 'Could not determine GitHub repository slug'
git fetch >/dev/null
git diff-index --quiet HEAD -- || die "Dirty working copy"
Expand Down Expand Up @@ -166,7 +166,7 @@ EOL
'#'*) continue;;
esac
info "Encrypting ${p%%=*}"
echo yes | $EXEC travis encrypt "$p" --add env.global
echo yes | $EXEC travis encrypt "$p" --add env.global --repo $repoSlug

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, I think the echo yes | is no longer necessary. I'll remove it in the following commit.

done <"$varsFile"
$EXEC git commit "$travisConfig" -m "Travis: add encrypted environment variables"
else
Expand All @@ -179,7 +179,7 @@ EOL
info "Encrypting $signingKeyDestFile"
# NB: We have to copy the file first, so that --add does the right thing.
$EXEC cp "$signingKeySourceFile" "$signingKeyDestFile"
$EXEC travis encrypt-file "$signingKeyDestFile" "$signingKeyDestFile.enc" --add
$EXEC travis encrypt-file "$signingKeyDestFile" "$signingKeyDestFile.enc" --add --repo $repoSlug
$EXEC rm -f "$signingKeyDestFile"
$EXEC git add "$travisConfig" "$signingKeyDestFile.enc"
$EXEC git commit -m "Travis: add encrypted GPG signing keypair"
Expand Down