diff --git a/.gitattributes b/.gitattributes index fd20d7edb..5b2946d19 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ * text eol=lf +*.bat text eol=crlf # Denote all files that are truly binary and should not be modified. *.png binary *.jpg binary @@ -9,3 +10,6 @@ *.eot binary *.ttf binary *.woff binary +*.jks binary +*.pfx binary +*.p12 binary diff --git a/docs/cleanup.bat b/docs/cleanup.bat new file mode 100644 index 000000000..ad121ee42 --- /dev/null +++ b/docs/cleanup.bat @@ -0,0 +1,23 @@ +@echo off +@REM +@REM Copyright (c) 2018 Bosch Software Innovations GmbH and others. +@REM +@REM All rights reserved. This program and the accompanying materials +@REM are made available under the terms of the Eclipse Public License v1.0 +@REM which accompanies this distribution, and is available at +@REM http://www.eclipse.org/legal/epl-v10.html +@REM + +rem This script is used to clean up the previously generated or downloaded files. + +echo [INFO] Remove Hugo Theme +rmdir /Q /S themes resources public +echo [INFO] ... done + +echo [INFO] + +echo [INFO] Remove generated REST docs +del /Q content\rest-api\*.html +echo [INFO] ... done + + diff --git a/docs/install-theme.bat b/docs/install-theme.bat new file mode 100644 index 000000000..fe2444bef --- /dev/null +++ b/docs/install-theme.bat @@ -0,0 +1,30 @@ +@echo off +@REM +@REM Copyright (c) 2018 Bosch Software Innovations GmbH and others. +@REM +@REM All rights reserved. This program and the accompanying materials +@REM are made available under the terms of the Eclipse Public License v1.0 +@REM which accompanies this distribution, and is available at +@REM http://www.eclipse.org/legal/epl-v10.html +@REM + +rem This script checks if 'hugo' is installed. Afterwards, the Hugo theme is downloaded. + +hugo version +if ERRORLEVEL 1 ( + echo [ERROR] Please install Hugo first before proceeding. + exit 1 +) + +echo [INFO] +echo [INFO] Install Hugo Theme +set HUGO_THEMES=themes\hugo-material-docs + +if not exist %HUGO_THEMES%\ ( + git submodule add --force https://github.com/digitalcraftsman/hugo-material-docs.git %HUGO_THEMES% + echo [INFO] ... done +) else echo [INFO] ... theme already installed in: %HUGO_THEMES% + +echo [INFO] +echo [INFO] Launch the documentation locally by running 'mvn site' (or 'hugo server' in the docs directory), +echo [INFO] and browse to 'http://localhost:1313/hawkbit/'. \ No newline at end of file diff --git a/docs/pom.xml b/docs/pom.xml index 0a5c7f1da..5029f6392 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -24,6 +24,35 @@ 1.6.0 + + + unix + + + !windows + + + + /bin/bash + + sh + + + + windows + + + windows + + + + cmd + /c + bat + + + + @@ -64,10 +93,11 @@ install - /bin/bash + ${shell} ${project.basedir} - install-theme.sh + ${shell.option} + install-theme.${batch.ext} @@ -92,10 +122,11 @@ clean - /bin/bash + ${shell} ${project.basedir} - cleanup.sh + ${shell.option} + cleanup.${batch.ext} diff --git a/docs/themes/hugo-material-docs b/docs/themes/hugo-material-docs deleted file mode 160000 index 9dbd25cf9..000000000 --- a/docs/themes/hugo-material-docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9dbd25cf9474f3a8bc4c09ec4c7965c8fdee9a5f