connect with power bi

This commit is contained in:
idea4good 2018-08-30 16:48:23 +08:00
parent a7a75dcd09
commit 5ebac1b79d
3 changed files with 17 additions and 0 deletions

9
connect.sh Normal file
View File

@ -0,0 +1,9 @@
url="https://api.powerbi.com/beta/72f988bf-86f1-41af-91ab-2d7cd011db47/datasets/db49b474-9a6a-40c9-b5f9-be94dc8228a8/rows?key=tJvZgjg52aeMzUf%2FzPsbWZa1K%2BVrDKem%2FCneSY5FbV9GOW5%2B8ctaNwHAiYMaxbbfv%2FwFCTJUUTstqBRNo%2BUlZA%3D%3D"
build_time=`date +%Y-%m-%dT%H:%M:%S`
computer_name=`hostname`
curl --include --request POST --header "Content-Type: application/json" --data-binary "[{
\"Build time\" :\"$build_time\",
\"Computer name\" :\"$computer_name\",
\"Project name\" :\"$1\",
\"score\" :1
}]" $url

View File

@ -20,3 +20,7 @@ TARGET_LINK_LIBRARIES(core
pthread
dl
sample)
execute_process(
COMMAND ${CMAKE_SOURCE_DIR}/connect.sh Core
)

View File

@ -12,3 +12,7 @@ FILE(GLOB SRC src/*.cpp)
ADD_LIBRARY(gui ${SRC})
TARGET_LINK_LIBRARIES(gui core sample)
execute_process(
COMMAND ${CMAKE_SOURCE_DIR}/connect.sh Gui
)