-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdeploy
More file actions
executable file
·38 lines (31 loc) · 882 Bytes
/
deploy
File metadata and controls
executable file
·38 lines (31 loc) · 882 Bytes
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
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# expects variables to be set:
# - OSSRH_JIRA_USERNAME
# - OSSRH_JIRA_PASSWORD
# - GPG_KEY_NAME
# - GPG_PASSPHRASE
# expects file to exist:
# - .travis/gpg.asc
set -e
# Check the variables are set
if [ -z "$OSSRH_JIRA_USERNAME" ]; then
echo "missing environment value: OSSRH_JIRA_USERNAME" >&2
exit 1
fi
if [ -z "$OSSRH_JIRA_PASSWORD" ]; then
echo "missing environment value: OSSRH_JIRA_PASSWORD" >&2
exit 1
fi
if [ -z "$GPG_KEY_NAME" ]; then
echo "missing environment value: GPG_KEY_NAME" >&2
exit 1
fi
if [ -z "$GPG_PASSPHRASE" ]; then
echo "missing environment value: GPG_PASSPHRASE" >&2
exit 1
fi
# Prepare the local keyring (requires travis to have decrypted the file
# beforehand)
gpg --fast-import .travis/gpg.asc
# Run the maven deploy steps
mvn deploy -P publish -DskipTests=true --settings "${TRAVIS_BUILD_DIR}/.travis/mvn-settings.xml"