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
|
||||
install:
|
||||
- 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
|
||||
env:
|
||||
global:
|
||||
|
||||
41
docs/README.adoc
Normal file
41
docs/README.adoc
Normal file
@@ -0,0 +1,41 @@
|
||||
// Do not edit this file (e.g. go instead to src/main/asciidoc)
|
||||
|
||||
Spring Boot command line features for
|
||||
https://github.com/spring-cloud[Spring Cloud].
|
||||
|
||||
|
||||
== Installation
|
||||
|
||||
To install, make
|
||||
sure you have
|
||||
https://github.com/spring-projects/spring-boot[Spring Boot CLI]
|
||||
(1.1.x with x>=5):
|
||||
|
||||
$ spring version
|
||||
Spring CLI v1.1.5.RELEASE
|
||||
|
||||
E.g. for GVM users
|
||||
|
||||
```
|
||||
$ gvm install springboot 1.1.5.RELEASE
|
||||
$ gvm use springboot 1.1.5.RELEASE
|
||||
```
|
||||
|
||||
then get the install command plugin (backported from Boot 1.2.0):
|
||||
|
||||
```
|
||||
$ wget http://dl.bintray.com/dsyer/generic/install-0.0.1.jar
|
||||
```
|
||||
|
||||
install it in the Spring Boot CLI, e.g. with GVM (MacOS users that rely on brew might have to find the `/lib` directory by scanning `brew info springboot`):
|
||||
|
||||
```
|
||||
$ cp install-0.0.1.jar ~/.gvm/springboot/1.1.5.RELEASE/lib
|
||||
```
|
||||
|
||||
and finally install the Spring Cloud plugin:
|
||||
|
||||
```
|
||||
$ mvn install
|
||||
$ spring install org.springframework.cloud:spring-cloud-cli:1.0.0.BUILD-SNAPSHOT
|
||||
```
|
||||
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-cli-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 Cli 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
|
||||
fi
|
||||
|
||||
if ! [ -d target/generated-docs ]; then
|
||||
echo "No gh-pages sources in target/generated-docs, so not syncing"
|
||||
if ! [ -d docs/target/generated-docs ]; then
|
||||
echo "No gh-pages sources in docs/target/generated-docs, so not syncing"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -22,8 +22,8 @@ if [ "$dirty" != "0" ]; then git stash; fi
|
||||
###################################################################
|
||||
git checkout gh-pages
|
||||
|
||||
for f in target/generated-docs/*; do
|
||||
file=${f#target/generated-docs/*}
|
||||
for f in docs/target/generated-docs/*; do
|
||||
file=${f#docs/target/generated-docs/*}
|
||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
||||
# Not ignored...
|
||||
cp -rf $f .
|
||||
25
pom.xml
25
pom.xml
@@ -25,6 +25,7 @@
|
||||
<modules>
|
||||
<module>spring-cloud-versions</module>
|
||||
<module>spring-cloud-cli</module>
|
||||
<module>docs</module>
|
||||
</modules>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
@@ -44,28 +45,4 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user