feat: add scripts cross ower

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-08-09 15:40:16 +08:00
parent bc8702749f
commit ca4bfde2aa
13 changed files with 18 additions and 14 deletions
Regular → Executable
+8 -6
View File
@@ -20,13 +20,15 @@ set -o nounset
set -o pipefail
# The root of the build/dist directory
OPENIM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"
OPENIM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
source ${OPENIM_ROOT}/scripts/lib/util.sh
cd /build
mkdir -p ${OPENIM_OUTPUT_TMP}
cd ${OPENIM_OUTPUT_TMP}
# gendocs takes "input.json" as the input swagger spec.
# $1 is expected to be <group>_<version>
cp /swagger-source/"$1".json input.json
cp ${OPENIM_OUTPUT_TMP}/swagger-source/"$1".json ${OPENIM_OUTPUT_TMP}/input.json
./gradle-2.5/bin/gradle gendocs --info
@@ -65,7 +67,7 @@ echo -e "=== any\nRepresents an untyped JSON map - see the description of the fi
asciidoctor definitions.adoc
asciidoctor paths.adoc
cp definitions.html /output/
cp paths.html /output/operations.html
cp ${OPENIM_OUTPUT_TMP}/definitions.html ${OPENIM_OUTPUT_TMP}/_output/
cp ${OPENIM_OUTPUT_TMP}/paths.html ${OPENIM_OUTPUT_TMP}/_output/operations.html
echo "SUCCESS"
success "SUCCESS"