huangcm
2024-12-18 9d29be7f7249789d6ffd0440067187a9f040c2cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
if [ $# -lt 1 ]; then
  echo "usage $0 <ssl-key> [<param> ...]"
  exit 1;
fi
key=$1
shift
 
#validate key
keystatus=$(gpg --list-keys | grep ${key} | awk '{print $1}')
if [ "${keystatus}" != "pub" ]; then
  echo "Could not find public key with label ${key}"
  echo -n "Available keys from: "
  gpg --list-keys | grep --invert-match '^sub'
 
  exit 64
fi
 
mvn "$@" -P '!examples' -P sonatype-oss-release \
    -Dgpg.skip=false -Dgpg.keyname=${key} \
    clean site:jar deploy