File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ process() {
6666 cd " $1 "
6767
6868 # -- Git sanity checks --
69- repoSlug=$( git remote -v | grep origin | head -n1 | sed ' s/.*github.com.\([^ ]*\) .*/\1 /' | sed ' s/\.git$ //' )
69+ repoSlug=$( grep ' <connection> ' pom.xml 2> /dev/null | sed ' s/[^>]*>/ /' | sed ' s/<.* //' | cut -d ' / ' -f4,5 )
7070 test " $repoSlug " && info " Repository = $repoSlug " || die ' Could not determine GitHub repository slug'
7171 git fetch > /dev/null
7272 git diff-index --quiet HEAD -- || die " Dirty working copy"
166166 ' #' * ) continue ;;
167167 esac
168168 info " Encrypting ${p%% =* } "
169- echo yes | $EXEC travis encrypt " $p " --add env.global
169+ echo yes | $EXEC travis encrypt " $p " --add env.global --repo $repoSlug
170170 done < " $varsFile "
171171 $EXEC git commit " $travisConfig " -m " Travis: add encrypted environment variables"
172172 else
179179 info " Encrypting $signingKeyDestFile "
180180 # NB: We have to copy the file first, so that --add does the right thing.
181181 $EXEC cp " $signingKeySourceFile " " $signingKeyDestFile "
182- $EXEC travis encrypt-file " $signingKeyDestFile " " $signingKeyDestFile .enc" --add
182+ $EXEC travis encrypt-file " $signingKeyDestFile " " $signingKeyDestFile .enc" --add --repo $repoSlug
183183 $EXEC rm -f " $signingKeyDestFile "
184184 $EXEC git add " $travisConfig " " $signingKeyDestFile .enc"
185185 $EXEC git commit -m " Travis: add encrypted GPG signing keypair"
You can’t perform that action at this time.
0 commit comments