@@ -145,6 +145,7 @@ function gpg_import() {
145
145
keyId=$( gpg " ${@ } " --batch --import " $privateKeyPath " 2>&1 | tee >( cat 1>&2 ) | grep ' key.*: secret key imported' | sed -E ' s/.*key ([^:]+):.*/\1/' )
146
146
# output the fingerprint of the imported key
147
147
gpg " ${@ } " --list-secret-keys --with-colon " $keyId " | sed -E ' 2!d;s/.*:([^:]+):$/\1/'
148
+ export JRELEASER_GPG_KEYNAME=$keyId
148
149
}
149
150
150
151
function gpg_delete() {
@@ -153,12 +154,6 @@ function gpg_delete() {
153
154
gpg " ${@ } " --batch --yes --delete-secret-keys " $fingerprint "
154
155
}
155
156
156
- function gpg_delete_public() {
157
- local fingerprint=" $1 "
158
- shift
159
- gpg " ${@ } " --batch --yes --delete-keys " $fingerprint "
160
- }
161
-
162
157
# --------------------------------------------
163
158
# Cleanup on exit
164
159
@@ -167,10 +162,6 @@ function cleanup() {
167
162
echo " Deleting imported GPG private key..."
168
163
gpg_delete " $IMPORTED_KEY " || true
169
164
fi
170
- if [ -n " $IMPORTED_PUBLIC_KEY " ]; then
171
- echo " Deleting imported GPG public key..."
172
- gpg_delete_public " $IMPORTED_PUBLIC_KEY " || true
173
- fi
174
165
if [ -d " $RELEASE_GPG_HOMEDIR " ]; then
175
166
echo " Cleaning up GPG homedir..."
176
167
rm -rf " $RELEASE_GPG_HOMEDIR " || true
@@ -195,7 +186,6 @@ if [ -z "$IMPORTED_KEY" ]; then
195
186
echo " Failed to import GPG key"
196
187
exit 1
197
188
fi
198
- IMPORTED_PUBLIC_KEY=" $( gpg_import " $RELEASE_GPG_PUBLIC_KEY_PATH " ) "
199
189
200
190
if [ " $PUSH_CHANGES " != " true" ]; then
201
191
ADDITIONAL_OPTIONS=" -d"
0 commit comments