mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 02:18:53 +00:00
Merge pull request #1347 from javuto/table_docs_with_package
Generation of table docs with packages and docs targets
This commit is contained in:
commit
7172c36d6f
@ -3,6 +3,8 @@ if(APPLE)
|
||||
add_custom_target(
|
||||
packages
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/tools/deployment/make_osx_package.sh"
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/tools/codegen/genapi.py" "${CMAKE_SOURCE_DIR}"
|
||||
"--output" "--directory" "${CMAKE_BINARY_DIR}"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
COMMENT "Building default OS X package (no custom config)" VERBATIM
|
||||
DEPENDS daemon shell
|
||||
@ -95,9 +97,11 @@ elseif(LINUX)
|
||||
|
||||
add_custom_target(
|
||||
packages
|
||||
"${CMAKE_SOURCE_DIR}/tools/deployment/make_linux_package.sh"
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/tools/deployment/make_linux_package.sh"
|
||||
-t ${PACKAGE_TYPE} -i "${PACKAGE_ITERATION}"
|
||||
-d "${PACKAGE_DEPENDENCIES}"
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/tools/codegen/genapi.py" "${CMAKE_SOURCE_DIR}"
|
||||
"--output" "--directory" "${CMAKE_BINARY_DIR}"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
COMMENT "Building linux packages (no custom config)" VERBATIM
|
||||
DEPENDS daemon shell
|
||||
|
@ -342,7 +342,9 @@ find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
add_custom_target(
|
||||
docs
|
||||
echo "PROJECT_NUMBER=${OSQUERY_BUILD_VERSION}" |
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/tools/codegen/genapi.py" "${CMAKE_SOURCE_DIR}"
|
||||
"--output" "--directory" "${CMAKE_SOURCE_DIR}/build/docs"
|
||||
COMMAND echo "PROJECT_NUMBER=${OSQUERY_BUILD_VERSION}" |
|
||||
cat ${CMAKE_SOURCE_DIR}/Doxyfile - |
|
||||
"${DOXYGEN_EXECUTABLE}" -;
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
|
@ -272,6 +272,7 @@ def main(argc, argv):
|
||||
|
||||
# Output file will be the version with json extension, otherwise stdout
|
||||
if args.output:
|
||||
print('[+] creating tables json')
|
||||
cmd = ['git', 'describe', '--tags', 'HEAD']
|
||||
proc = subprocess.Popen(
|
||||
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
@ -285,6 +286,7 @@ def main(argc, argv):
|
||||
|
||||
with open(output_path, 'w') as f:
|
||||
print(gen_api_json(api), file=f)
|
||||
print('[+] tables json file created at %s' % (output_path))
|
||||
else:
|
||||
print(gen_api_json(api))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user