Skip to content

Commit e89c991

Browse files
committed
use branch/tag for docs folder
1 parent 908e456 commit e89c991

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

spring-boot-admin-docs/deploy-gh-pages.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,21 @@
1111
##
1212
set -o errexit -o nounset
1313

14-
PROJECT_VERSION=$1
15-
1614
GH_URL="https://${GH_TOKEN}@github.com/codecentric/spring-boot-admin.git"
1715
TEMPDIR="$(mktemp -d /tmp/gh-pages.XXX)"
16+
TARGET_DIR="${TRAVIS_BRANCH/master/current}"
1817

1918
echo "Cloning gh-pages branch..."
20-
git clone --branch gh-pages --single-branch --depth 1 --config user.name="Johannes Edmeier" --config user.email="johannes.edmeier@gmail.com" "$GH_URL" "$TEMPDIR"
19+
git clone --branch gh-pages --single-branch --depth 1 --config user.name="Johannes Edmeier" --config user.email="johannes.edmeier@codecentric.de" "$GH_URL" "$TEMPDIR"
2120

22-
if [[ -d "$TEMPDIR"/"${PROJECT_VERSION}-SNAPSHOT" ]]; then
23-
echo "Removing ${PROJECT_VERSION}-SNAPSHOT..."
24-
rm -rf "$TEMPDIR"/"${PROJECT_VERSION}-SNAPSHOT"
21+
if [[ -d "$TEMPDIR"/"${TARGET_DIR}" ]]; then
22+
echo "Cleaning ${TARGET_DIR}..."
23+
rm -rf "$TEMPDIR"/"${TARGET_DIR}"
2524
fi
2625

2726
echo "Copying new docs..."
28-
mkdir -p "$TEMPDIR"/"${PROJECT_VERSION}"
29-
cp -r target/generated-docs/* "$TEMPDIR"/"${PROJECT_VERSION}"/
27+
mkdir -p "$TEMPDIR"/"${TARGET_DIR}"
28+
cp -r target/generated-docs/* "$TEMPDIR"/"${TARGET_DIR}"/
3029

3130
pushd "$TEMPDIR" >/dev/null
3231
git add --all .
@@ -35,12 +34,12 @@ if git diff-index --quiet HEAD; then
3534
echo "No changes detected."
3635
else
3736
echo "Commit changes..."
38-
git commit --message "Docs for ${PROJECT_VERSION}"
37+
git commit --message "Docs for ${TARGET_DIR}"
3938
echo "Pushing gh-pages..."
4039
git push origin gh-pages
4140
fi
4241

4342
popd >/dev/null
4443

4544
rm -rf "$TEMPDIR"
46-
exit 0
45+
exit 0

spring-boot-admin-docs/pom.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@
6666
</goals>
6767
<configuration>
6868
<executable>./deploy-gh-pages.sh</executable>
69-
<arguments>
70-
<argument>${project.version}</argument>
71-
</arguments>
7269
</configuration>
7370
</execution>
7471
</executions>

spring-boot-admin-docs/src/main/asciidoc/client.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ For applications using older versions of Spring Boot the loglevel management is
4848
[source,xml]
4949
.logback-spring.xml
5050
----
51-
include::{samples-dir}/spring-boot-admin-sample/src/main/resources/logback-spring.xml[]
51+
<?xml version="1.0" encoding="UTF-8"?>
52+
<configuration>
53+
<include resource="org/springframework/boot/logging/logback/base.xml"/>
54+
<jmxConfigurator/>
55+
</configuration>
5256
----
5357

5458
NOTE: In case you are deploying multiple applications to the same JVM and multiple Logback-JMX-beans are present, the UI will select the JMXConfigurator with the context-name equals to your applications name. In this case you need to set the `contextName` in your logback-configuration.

0 commit comments

Comments
 (0)