diff --git a/CMakeLists.txt b/CMakeLists.txt index 68c3615..282c98e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,21 +2,15 @@ cmake_minimum_required(VERSION 2.8) project("proto2json") -# CMake commands copied by the CMake file for CImg - -# To use PKG_CHECK_MODULES to find some optional packages find_package(PkgConfig) - # ### Search Additional Libraries ########## - + SET(CMAKE_CXX_FLAGS "-std=c++11 -O3") # #### End of additional libraries search ########## - ### Configure Paths according to detected packages - if (NOT APPLE) if(NOT WIN32) @@ -176,6 +170,11 @@ install(PROGRAMS build/proto2json DESTINATION bin) +add_custom_target(package + COMMAND sh ../bin/package.sh + COMMENT "Now Generating tar.gz file..." +) + if(CMAKE_SYSTEM_NAME MATCHES "Linux") add_custom_command(TARGET proto2json POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different diff --git a/bin/package.sh b/bin/package.sh new file mode 100644 index 0000000..cc8895a --- /dev/null +++ b/bin/package.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash +export protover=`cat ../src/version.h | grep PROTOJSON_VERSION` +ver=`echo $protover | awk '{print $3}' | sed "s/\"//g"` +tar -zcvf proto2json-$ver-macos-brew.tar.gz ../build/proto2json +openssl dgst -sha256 proto2json-$ver-macos-brew.tar.gz \ No newline at end of file diff --git a/src/AVisitor.cpp b/src/AVisitor.cpp index 84e7888..e7acb08 100644 --- a/src/AVisitor.cpp +++ b/src/AVisitor.cpp @@ -691,7 +691,7 @@ Json::Value AVisitor::parseParamBody(std::string parName) { arr["$$ref"] = "#/definitions/" + fieldType; arr["items"]["type"] = "object"; //arr["items"]["properties"] = objTmp["properties"]; - arr["description"] = fieldType;// objTmp["title"]; + arr["description"] = fieldType; body["properties"][pName] = arr; } continue;