Skip to content

Commit 0a40f39

Browse files
committed
release-version.sh: simplify GPG config validation
We don't need a properly configured GPG configuration on the client side anymore. But Travis needs a GPG signing keypair, which lives in .travis/signingkey.asc.enc. Fail the release if it's missing.
1 parent eb767d5 commit 0a40f39

1 file changed

Lines changed: 2 additions & 23 deletions

File tree

release-version.sh

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,8 @@ valid_semver_bump () {
2121
}
2222

2323
verify_gpg_settings () {
24-
gpg=$(xmllint --xpath '//settings/profiles/profile' "$HOME/.m2/settings.xml")
25-
test "$gpg" && id=$(echo "$gpg" | xmllint --xpath '//profile/id/text()' -)
26-
test "$gpg" && keyname=$(echo "$gpg" | xmllint --xpath '//profile/properties/gpg.keyname' -)
27-
test "$gpg" && passphrase=$(echo "$gpg" | xmllint --xpath '//profile/properties/gpg.passphrase' -)
28-
test "$keyname" -a "$passphrase" ||
29-
die 'GPG configuration not found in settings.xml. Please add it:
30-
<settings>
31-
<profiles>
32-
<profile>
33-
<id>gpg</id>
34-
<activation>
35-
<file>
36-
<exists>${env.HOME}/.gnupg</exists>
37-
</file>
38-
</activation>
39-
<properties>
40-
<gpg.keyname>(your GPG email address)</gpg.keyname>
41-
<gpg.passphrase>(your GPG passphrase)</gpg.passphrase>
42-
</properties>
43-
</profile>
44-
</profiles>
45-
</settings>
46-
24+
test -f .travis/signingkey.asc.enc ||
25+
die 'GPG configuration not found. Please use travisify.sh to add it.
4726
See also: https://github.com/scijava/pom-scijava/wiki/GPG-Signing'
4827
}
4928

0 commit comments

Comments
 (0)