moved static guidebook script to nb

This commit is contained in:
Jonathan Shook 2020-03-09 18:19:47 -05:00
parent e4c0fcd08c
commit ecce297d8d
2 changed files with 32 additions and 27 deletions

View File

@ -1,32 +1,28 @@
#!/bin/bash
# update nuxt
GUIDEBOOK="nb/target"
GUIDEBOOK="target/guidebook"
if [ ! -d "nb/target" ]
if [ ! -f "target/nb.jar" ]
then
printf "You should not run this unless you have an nb/target directory.\n"
printf "It depends on the Java components to be built first.\n"
printf "You should not run this unless you have target/nb.jar\n"
exit 6
fi
if [ ! -d "nb/target/guidebook" ]
if [ ! -d "target/guidebook" ]
then
pushd docsys/src/main/node/docsys
pushd ../docsys/src/main/node/docsys
if ! ./update.sh $@
then
printf "Unable to update the guidebook static app\n"
exit 2;
fi
popd
printf "PWD: %s\n" $(pwd)
cp -R docsys/src/main/resources/docsys-guidebook/ nb/target/guidebook/
cp -R ../docsys/src/main/resources/docsys-guidebook/ target/guidebook/
else
printf "nb/target/guidebook exists, not building again until mvn clean\n"
printf "target/guidebook exists, not building again until mvn clean\n"
fi
JAVA=$(which java)
@ -38,7 +34,7 @@ then
exit 5
fi
$JAVA -jar nb/target/nb.jar docserver generate nb/target/guidebook
$JAVA -jar target/nb.jar docserver generate target/guidebook
#JAVA_HOME=${JAVA_HOME:-JAVA_HOME must be specified if java isn not in the path}
#

View File

@ -180,21 +180,30 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>build-nb-appimage</id>
<phase>package</phase>
<goals><goal>exec</goal></goals>
<configuration>
<basedir>${project.basedir}/appimage</basedir>
<executable>${project.basedir}/appimage/build</executable>
</configuration>
</execution>
</executions>
</plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>build-nb-appimage</id>
<phase>package</phase>
<goals><goal>exec</goal></goals>
<configuration>
<basedir>${project.basedir}/appimage</basedir>
<executable>${project.basedir}/appimage/build</executable>
</configuration>
</execution>
<execution>
<id>build-static-guidebook</id>
<phase>package</phase>
<goals><goal>exec</goal></goals>
<configuration>
<basedir>${project.basedir}</basedir>
<executable>${project.basedir}/gendocs.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>