Move docs to submodule for multi-module projects
This commit is contained in:
@@ -6,7 +6,7 @@ before_install:
|
|||||||
- echo "https://$GH_TOKEN:@github.com" > .git/credentials
|
- echo "https://$GH_TOKEN:@github.com" > .git/credentials
|
||||||
install:
|
install:
|
||||||
- mvn --settings .settings.xml install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
|
- mvn --settings .settings.xml install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
|
||||||
- ./src/main/asciidoc/ghpages.sh
|
- ./docs/src/main/asciidoc/ghpages.sh
|
||||||
script: mvn --settings .settings.xml deploy -nsu -Dmaven.test.redirectTestOutputToFile=true
|
script: mvn --settings .settings.xml deploy -nsu -Dmaven.test.redirectTestOutputToFile=true
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
|||||||
44
docs/pom.xml
Normal file
44
docs/pom.xml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-docs</artifactId>
|
||||||
|
<version>1.0.0.BUILD-SNAPSHOT</version>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-build</artifactId>
|
||||||
|
<version>1.0.0.BUILD-SNAPSHOT</version>
|
||||||
|
<relativePath/>
|
||||||
|
</parent>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Spring Cloud Starter Docs</name>
|
||||||
|
<description>Spring Cloud Docs</description>
|
||||||
|
<properties>
|
||||||
|
<docs.main>spring-cloud-cli</docs.main>
|
||||||
|
<main.basedir>${basedir}/..</main.basedir>
|
||||||
|
</properties>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>docs</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.asciidoctor</groupId>
|
||||||
|
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||||
|
<inherited>false</inherited>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<inherited>false</inherited>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<inherited>false</inherited>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
</project>
|
||||||
@@ -7,8 +7,8 @@ if ! (git remote set-branches --add origin gh-pages && git fetch -q); then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ -d target/generated-docs ]; then
|
if ! [ -d docs/target/generated-docs ]; then
|
||||||
echo "No gh-pages sources in target/generated-docs, so not syncing"
|
echo "No gh-pages sources in docs/target/generated-docs, so not syncing"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -22,8 +22,8 @@ if [ "$dirty" != "0" ]; then git stash; fi
|
|||||||
###################################################################
|
###################################################################
|
||||||
git checkout gh-pages
|
git checkout gh-pages
|
||||||
|
|
||||||
for f in target/generated-docs/*; do
|
for f in docs/target/generated-docs/*; do
|
||||||
file=${f#target/generated-docs/*}
|
file=${f#docs/target/generated-docs/*}
|
||||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
||||||
# Not ignored...
|
# Not ignored...
|
||||||
cp -rf $f .
|
cp -rf $f .
|
||||||
26
pom.xml
26
pom.xml
@@ -25,6 +25,7 @@
|
|||||||
<module>spring-cloud-starter-security</module>
|
<module>spring-cloud-starter-security</module>
|
||||||
<module>spring-cloud-starter-turbine</module>
|
<module>spring-cloud-starter-turbine</module>
|
||||||
<module>spring-cloud-starter-zuul</module>
|
<module>spring-cloud-starter-zuul</module>
|
||||||
|
<module>docs</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@@ -165,30 +166,5 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>docs</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.asciidoctor</groupId>
|
|
||||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
|
||||||
<inherited>false</inherited>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<inherited>false</inherited>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<inherited>false</inherited>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Reference in New Issue
Block a user