-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
31 lines (26 loc) · 1.29 KB
/
deploy.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
29
30
31
#!/bin/bash
# DO NOT RUN THIS SCRIPT ON YOUR LOCAL MACHINE!!!
#
# This scipt WILL stomp all over any GPG keys you may already
# have installed.
#
# You have been warned.
# This script is called by Travis after the master branch build passes and
# does the following:
# 1. Downloads the encrypted copies of the GPG keys needed to sign artifacts.
# 2. Decrypts the keys to ~/.gnupg (this is the dangerous bit)
# 3. Creates the jars, javadocs, and sources. Signs everything and deploys to
# oss.sonatype.org (either as a SNAPSHOT or to the staging repository).
# 4. Creates the Maven site and pushes this to the gh_pages branch in the
# project repository.
# 1. Download the keys,
wget http://www.lappsgrid.org/keys/secring.gpg.enc
wget http://www.lappsgrid.org/keys/pubring.gpg.enc
# 2. Decrypt the keys.
openssl aes-256-cbc -d -pass pass:"$ENCRYPTION_PASSWORD" -in secring.gpg.enc -out ~/.gnupg/secring.gpg
openssl aes-256-cbc -d -pass pass:"$ENCRYPTION_PASSWORD" -in pubring.gpg.enc -out ~/.gnupg/pubring.gpg
# 3. Build and sign everything.
mvn -DskipTests=true package javadoc:jar source:jar deploy -Dgpg.passphrase="$PGP_PASSPHRASE" --settings settings.xml -Prelease,staging
# 4. Build and deploy the Maven site to the gh_pages branch.
#src/test/resources/lappsdoc
#mvn site --settings settings.xml -Pstaging