File tree Expand file tree Collapse file tree 1 file changed +8
-37
lines changed Expand file tree Collapse file tree 1 file changed +8
-37
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- DEPLOY_PATH=/home/rabbitmq/extras/releases/rabbitmq-java-client/current-javadoc
4-
5- # RSync user/host to deploy to. Mandatory.
6- DEPLOY_USERHOST=
7-
8-
9- # Imitate make-style variable settings as arguments
10- while [[ $# -gt 0 ]] ; do
11- declare " $1 "
12- shift
13- done
14-
15- mandatory_vars=" DEPLOY_USERHOST"
16- optional_vars=" DEPLOY_PATH"
17-
18- function die () {
19- echo " $@ " 2>&1
20- exit 1
21- }
22-
23- # Check mandatory settings
24- for v in $mandatory_vars ; do
25- [[ -n " ${! v} " ]] || die " $v not set"
26- done
27-
28- echo " Settings:"
29- for v in $mandatory_vars $optional_vars ; do
30- echo " ${v} =${! v} "
31- done
32-
33- set -e -x
3+ DEPLOY_DIRECTORY=api/4.x.x
4+ TAG=$( git describe --exact-match --tags $( git log -n1 --pretty=' %h' ) )
345
356mvn -q clean javadoc:javadoc -Dmaven.javadoc.failOnError=false
36-
37- ssh $DEPLOY_USERHOST \
38- " rm -rf $DEPLOY_PATH ; \
39- mkdir -p $DEPLOY_PATH "
40-
41- rsync -rpl --exclude ' *.sh ' target/site/apidocs/ $DEPLOY_USERHOST : $DEPLOY_PATH
7+ git co gh-pages
8+ rm -rf $DEPLOY_DIRECTORY / *
9+ cp -r target/site/apidocs/ * $DEPLOY_DIRECTORY
10+ git add $DEPLOY_DIRECTORY
11+ git commit -m " Add Javadoc for $TAG "
12+ git push origin gh-pages
4213
4314
You can’t perform that action at this time.
0 commit comments