forked from otto-de/synapse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·28 lines (21 loc) · 1.15 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -e
SCRIPT_DIR=$(dirname $0)
USER_GRADLE_PROPERTIES=~/.gradle/gradle.properties
check_configured() {
grep -q $1 ${USER_GRADLE_PROPERTIES} || echo "$1 not configured in ${USER_GRADLE_PROPERTIES}. $2"
}
check_configuration() {
if [ ! -f ${USER_GRADLE_PROPERTIES} ]; then
echo "${USER_GRADLE_PROPERTIES} does not exist"
exit 1
fi
check_configured "sonatypeUsername" "This is the username you use to authenticate with sonatype nexus (e.g. otto-de)"
check_configured "sonatypePassword" "This is the password you use to authenticate with sonatype nexus (ask Guido or one of the developers)"
check_configured "signing.secretKeyRingFile" "This is the gpg secret key file, e.g. ~/.gnupg/secring.gpg. If this doesn't exist, generate a key: gpg --gen-key"
check_configured "signing.keyId" "This is the id of your key (e.g. 72FE5380). Use gpg --list-keys to find yours"
check_configured "signing.password" "This is the password you defined for your gpg key"
# gpg --send-keys --keyserver keyserver.ubuntu.com yourKeyId
}
check_configuration
${SCRIPT_DIR}/gradlew uploadArchives closeAndReleaseRepository