Release v0.1.5.4 prepare for release
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
test_basic 12 0.570438
|
test_basic 13 0.51498
|
||||||
example_run 0 0
|
example_run 0 0
|
||||||
---
|
---
|
||||||
example_run
|
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
<!doctype html><html><head><meta name='viewport' content='width=device-width,initial-scale=1'><meta charset='UTF-8'><link rel='stylesheet' type='text/css' href='style.css'><script src='control.js'></script></head><body><h2>Coverage Report</h2><h4>Created: 2025-08-29 11:28</h4><p>Click <a href='http://clang.llvm.org/docs/SourceBasedCodeCoverage.html#interpreting-reports'>here</a> for information about interpreting this report.</p><div class='centered'><table><tr><td class='column-entry-bold'>Filename</td><td class='column-entry-bold'>Function Coverage</td><td class='column-entry-bold'>Line Coverage</td><td class='column-entry-bold'>Region Coverage</td><td class='column-entry-bold'>Branch Coverage</td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\base58.cpp.html'>base58.cpp</a></pre></td><td class='column-entry-red'><pre> 0.00% (0/2)</pre></td><td class='column-entry-red'><pre> 0.00% (0/67)</pre></td><td class='column-entry-red'><pre> 0.00% (0/48)</pre></td><td class='column-entry-red'><pre> 0.00% (0/34)</pre></td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\crypto.cpp.html'>crypto.cpp</a></pre></td><td class='column-entry-red'><pre> 66.67% (4/6)</pre></td><td class='column-entry-red'><pre> 56.19% (59/105)</pre></td><td class='column-entry-red'><pre> 36.84% (7/19)</pre></td><td class='column-entry-red'><pre> 0.00% (0/2)</pre></td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\http_client.cpp.html'>http_client.cpp</a></pre></td><td class='column-entry-green'><pre> 100.00% (5/5)</pre></td><td class='column-entry-red'><pre> 51.67% (186/360)</pre></td><td class='column-entry-red'><pre> 66.67% (170/255)</pre></td><td class='column-entry-red'><pre> 41.38% (48/116)</pre></td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\json_parser.cpp.html'>json_parser.cpp</a></pre></td><td class='column-entry-green'><pre> 100.00% (5/5)</pre></td><td class='column-entry-yellow'><pre> 84.21% (80/95)</pre></td><td class='column-entry-red'><pre> 71.88% (23/32)</pre></td><td class='column-entry-red'><pre> 50.00% (7/14)</pre></td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\privatebinapi.cpp.html'>privatebinapi.cpp</a></pre></td><td class='column-entry-red'><pre> 50.00% (3/6)</pre></td><td class='column-entry-red'><pre> 27.01% (57/211)</pre></td><td class='column-entry-red'><pre> 28.15% (38/135)</pre></td><td class='column-entry-red'><pre> 21.43% (15/70)</pre></td></tr><tr class='light-row-bold'><td><pre>Totals</pre></td><td class='column-entry-red'><pre> 70.83% (17/24)</pre></td><td class='column-entry-red'><pre> 45.58% (382/838)</pre></td><td class='column-entry-red'><pre> 48.67% (238/489)</pre></td><td class='column-entry-red'><pre> 29.66% (70/236)</pre></td></tr></table></div><h5>Generated by llvm-cov -- llvm version 21.1.0</h5></body></html>
|
<!doctype html><html><head><meta name='viewport' content='width=device-width,initial-scale=1'><meta charset='UTF-8'><link rel='stylesheet' type='text/css' href='style.css'><script src='control.js'></script></head><body><h2>Coverage Report</h2><h4>Created: 2025-08-29 12:37</h4><p>Click <a href='http://clang.llvm.org/docs/SourceBasedCodeCoverage.html#interpreting-reports'>here</a> for information about interpreting this report.</p><div class='centered'><table><tr><td class='column-entry-bold'>Filename</td><td class='column-entry-bold'>Function Coverage</td><td class='column-entry-bold'>Line Coverage</td><td class='column-entry-bold'>Region Coverage</td><td class='column-entry-bold'>Branch Coverage</td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\base58.cpp.html'>base58.cpp</a></pre></td><td class='column-entry-red'><pre> 0.00% (0/2)</pre></td><td class='column-entry-red'><pre> 0.00% (0/67)</pre></td><td class='column-entry-red'><pre> 0.00% (0/48)</pre></td><td class='column-entry-red'><pre> 0.00% (0/34)</pre></td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\crypto.cpp.html'>crypto.cpp</a></pre></td><td class='column-entry-red'><pre> 66.67% (4/6)</pre></td><td class='column-entry-red'><pre> 56.19% (59/105)</pre></td><td class='column-entry-red'><pre> 36.84% (7/19)</pre></td><td class='column-entry-red'><pre> 0.00% (0/2)</pre></td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\http_client.cpp.html'>http_client.cpp</a></pre></td><td class='column-entry-green'><pre> 100.00% (5/5)</pre></td><td class='column-entry-red'><pre> 51.67% (186/360)</pre></td><td class='column-entry-red'><pre> 66.67% (170/255)</pre></td><td class='column-entry-red'><pre> 41.38% (48/116)</pre></td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\json_parser.cpp.html'>json_parser.cpp</a></pre></td><td class='column-entry-green'><pre> 100.00% (5/5)</pre></td><td class='column-entry-yellow'><pre> 84.21% (80/95)</pre></td><td class='column-entry-red'><pre> 71.88% (23/32)</pre></td><td class='column-entry-red'><pre> 50.00% (7/14)</pre></td></tr><tr class='light-row'><td><pre><a href='coverage\Users\mbusc\source\repos\privatebin-cpp\src\privatebinapi.cpp.html'>privatebinapi.cpp</a></pre></td><td class='column-entry-red'><pre> 50.00% (3/6)</pre></td><td class='column-entry-red'><pre> 27.01% (57/211)</pre></td><td class='column-entry-red'><pre> 28.15% (38/135)</pre></td><td class='column-entry-red'><pre> 21.43% (15/70)</pre></td></tr><tr class='light-row-bold'><td><pre>Totals</pre></td><td class='column-entry-red'><pre> 70.83% (17/24)</pre></td><td class='column-entry-red'><pre> 45.58% (382/838)</pre></td><td class='column-entry-red'><pre> 48.67% (238/489)</pre></td><td class='column-entry-red'><pre> 29.66% (70/236)</pre></td></tr></table></div><h5>Generated by llvm-cov -- llvm version 21.1.0</h5></body></html>
|
||||||
Binary file not shown.
Binary file not shown.
@@ -116,11 +116,11 @@ if %errorlevel% neq 0 goto :cmEnd
|
|||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
"C:\Program Files\LLVM\bin\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Debug/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Debug/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Debug/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Debug/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
:cmEnd
|
:cmEnd
|
||||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
@@ -142,11 +142,11 @@ if %errorlevel% neq 0 goto :cmEnd
|
|||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
"C:\Program Files\LLVM\bin\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
:cmEnd
|
:cmEnd
|
||||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
@@ -168,11 +168,11 @@ if %errorlevel% neq 0 goto :cmEnd
|
|||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
"C:\Program Files\LLVM\bin\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/MinSizeRel/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/MinSizeRel/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/MinSizeRel/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/MinSizeRel/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
:cmEnd
|
:cmEnd
|
||||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
@@ -194,11 +194,11 @@ if %errorlevel% neq 0 goto :cmEnd
|
|||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
"C:\Program Files\LLVM\bin\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/RelWithDebInfo/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/RelWithDebInfo/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/RelWithDebInfo/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/RelWithDebInfo/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
:cmEnd
|
:cmEnd
|
||||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
|||||||
@@ -21,16 +21,16 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
if(CTEST_CONFIGURATION_TYPE MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
|
if(CTEST_CONFIGURATION_TYPE MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
|
||||||
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Debug/example.exe")
|
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Debug/example.exe")
|
||||||
set_tests_properties(example_run PROPERTIES DISABLED "FALSE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
set_tests_properties(example_run PROPERTIES DISABLED "TRUE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
|
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
|
||||||
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Release/example.exe")
|
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Release/example.exe")
|
||||||
set_tests_properties(example_run PROPERTIES DISABLED "FALSE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
set_tests_properties(example_run PROPERTIES DISABLED "TRUE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$")
|
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$")
|
||||||
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/MinSizeRel/example.exe")
|
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/MinSizeRel/example.exe")
|
||||||
set_tests_properties(example_run PROPERTIES DISABLED "FALSE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
set_tests_properties(example_run PROPERTIES DISABLED "TRUE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$")
|
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$")
|
||||||
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/RelWithDebInfo/example.exe")
|
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/RelWithDebInfo/example.exe")
|
||||||
set_tests_properties(example_run PROPERTIES DISABLED "FALSE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
set_tests_properties(example_run PROPERTIES DISABLED "TRUE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||||
else()
|
else()
|
||||||
add_test(example_run NOT_AVAILABLE)
|
add_test(example_run NOT_AVAILABLE)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ if %errorlevel% neq 0 goto :cmEnd
|
|||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
"C:\Program Files\LLVM\bin\llvm-profdata.exe" merge -sparse C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/*.profraw -o C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" report C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles)
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
"C:\\Program Files\\LLVM\\bin\\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
"C:\Program Files\LLVM\bin\llvm-cov.exe" show C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/privatebinapi.dll --instr-profile=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/merged.profdata --ignore-filename-regex= (vcpkg^|external^|CMakeFiles) --format=html --output-dir=C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/coverage/html
|
||||||
if %errorlevel% neq 0 goto :cmEnd
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
:cmEnd
|
:cmEnd
|
||||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
|||||||
+37
-15
@@ -78,13 +78,15 @@ if (Test-Path "build\CTestTestfile.cmake") {
|
|||||||
# Optional: clang-cl Coverage bauen und HTML-Report als Artefakt paketieren
|
# Optional: clang-cl Coverage bauen und HTML-Report als Artefakt paketieren
|
||||||
Write-Host "Erzeuge optionalen Coverage-Report (clang-cl + LLVM), falls Tools vorhanden sind..." -ForegroundColor Yellow
|
Write-Host "Erzeuge optionalen Coverage-Report (clang-cl + LLVM), falls Tools vorhanden sind..." -ForegroundColor Yellow
|
||||||
try {
|
try {
|
||||||
$llvmCov = "C:\\Program Files\\LLVM\\bin\\llvm-cov.exe"
|
$llvmCov = "C:\Program Files\LLVM\bin\llvm-cov.exe"
|
||||||
$llvmProf = "C:\\Program Files\\LLVM\\bin\\llvm-profdata.exe"
|
$llvmProf = "C:\Program Files\LLVM\bin\llvm-profdata.exe"
|
||||||
$llvmCovExists = Test-Path $llvmCov
|
$llvmCovExists = Test-Path $llvmCov
|
||||||
$llvmProfExists = Test-Path $llvmProf
|
$llvmProfExists = Test-Path $llvmProf
|
||||||
|
|
||||||
if ($llvmCovExists -and $llvmProfExists) {
|
if ($llvmCovExists -and $llvmProfExists) {
|
||||||
$toolchain = Join-Path $env:USERPROFILE 'vcpkg\scripts\buildsystems\vcpkg.cmake'
|
$toolchain = Join-Path $env:USERPROFILE 'vcpkg\scripts\buildsystems\vcpkg.cmake'
|
||||||
$haveToolchain = Test-Path $toolchain
|
$haveToolchain = Test-Path $toolchain
|
||||||
|
|
||||||
$cmakeArgs = @(
|
$cmakeArgs = @(
|
||||||
'-S','.',
|
'-S','.',
|
||||||
'-B','build-clang',
|
'-B','build-clang',
|
||||||
@@ -95,23 +97,33 @@ try {
|
|||||||
("-DLLVM_PROFDATA={0}" -f $llvmProf),
|
("-DLLVM_PROFDATA={0}" -f $llvmProf),
|
||||||
("-DLLVM_COV={0}" -f $llvmCov)
|
("-DLLVM_COV={0}" -f $llvmCov)
|
||||||
)
|
)
|
||||||
|
|
||||||
if ($haveToolchain) {
|
if ($haveToolchain) {
|
||||||
$cmakeArgs += ("-DCMAKE_TOOLCHAIN_FILE={0}" -f $toolchain)
|
$cmakeArgs += ("-DCMAKE_TOOLCHAIN_FILE={0}" -f $toolchain)
|
||||||
$cmakeArgs += '-DVCPKG_TARGET_TRIPLET=x64-windows'
|
$cmakeArgs += '-DVCPKG_TARGET_TRIPLET=x64-windows'
|
||||||
}
|
}
|
||||||
|
|
||||||
& cmake @cmakeArgs | Out-Null
|
& cmake @cmakeArgs | Out-Null
|
||||||
if ($LASTEXITCODE -ne 0) { throw "CMake-Konfiguration für Coverage fehlgeschlagen" }
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "CMake-Konfiguration für Coverage fehlgeschlagen"
|
||||||
|
}
|
||||||
|
|
||||||
# Run coverage target with integration tests disabled to avoid rate limits
|
# Run coverage target with integration tests disabled to avoid rate limits
|
||||||
$env:PRIVATEBIN_IT = '0'
|
$env:PRIVATEBIN_IT = '0'
|
||||||
& cmake --build build-clang --config Release --target coverage_llvm
|
& cmake --build build-clang --config Release --target coverage_llvm
|
||||||
if ($LASTEXITCODE -ne 0) { throw "Coverage-Build fehlgeschlagen" }
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "Coverage-Build fehlgeschlagen"
|
||||||
|
}
|
||||||
|
|
||||||
$htmlDir = "build-clang/coverage/html"
|
$htmlDir = "build-clang\coverage\html"
|
||||||
if (Test-Path $htmlDir) {
|
if (Test-Path $htmlDir) {
|
||||||
if (-not (Test-Path 'dist')) { New-Item -ItemType Directory -Path 'dist' | Out-Null }
|
if (-not (Test-Path 'dist')) {
|
||||||
$zipPath = "dist/coverage_html.zip"
|
New-Item -ItemType Directory -Path 'dist' | Out-Null
|
||||||
if (Test-Path $zipPath) { Remove-Item -Force $zipPath }
|
}
|
||||||
|
$zipPath = "dist\coverage_html.zip"
|
||||||
|
if (Test-Path $zipPath) {
|
||||||
|
Remove-Item -Force $zipPath
|
||||||
|
}
|
||||||
Compress-Archive -Path "$htmlDir\*" -DestinationPath $zipPath
|
Compress-Archive -Path "$htmlDir\*" -DestinationPath $zipPath
|
||||||
Write-Host "Coverage-HTML nach $zipPath gepackt." -ForegroundColor Green
|
Write-Host "Coverage-HTML nach $zipPath gepackt." -ForegroundColor Green
|
||||||
} else {
|
} else {
|
||||||
@@ -124,15 +136,16 @@ try {
|
|||||||
Write-Host "Warnung: Coverage-Erzeugung fehlgeschlagen: $($_.Exception.Message)" -ForegroundColor Yellow
|
Write-Host "Warnung: Coverage-Erzeugung fehlgeschlagen: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
|
|
||||||
<#
|
# Commit & Push, Tag & Push
|
||||||
Commit & Push, Tag & Push
|
|
||||||
#>
|
|
||||||
# Änderungen committen
|
# Änderungen committen
|
||||||
$status = git status --porcelain
|
$status = git status --porcelain
|
||||||
if ($status) {
|
if ($status) {
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "Release $newVersion prepare for release"
|
git commit -m "Release $newVersion prepare for release"
|
||||||
if ($LASTEXITCODE -ne 0) { Write-Host "Commit fehlgeschlagen." -ForegroundColor Red; exit 1 }
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "Commit fehlgeschlagen." -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remote/Repo-Infos ermitteln
|
# Remote/Repo-Infos ermitteln
|
||||||
@@ -143,7 +156,10 @@ if (-not $remoteUrl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Host, Owner, Repo aus URL extrahieren (https oder ssh)
|
# Host, Owner, Repo aus URL extrahieren (https oder ssh)
|
||||||
$gitHost = $null; $owner = $null; $repoName = $null
|
$gitHost = $null
|
||||||
|
$owner = $null
|
||||||
|
$repoName = $null
|
||||||
|
|
||||||
if ($remoteUrl -match '^(https?://)([^/]+)/(.+?)(?:\.git)?$') {
|
if ($remoteUrl -match '^(https?://)([^/]+)/(.+?)(?:\.git)?$') {
|
||||||
$gitHost = $matches[2]
|
$gitHost = $matches[2]
|
||||||
$path = $matches[3]
|
$path = $matches[3]
|
||||||
@@ -151,6 +167,7 @@ if ($remoteUrl -match '^(https?://)([^/]+)/(.+?)(?:\.git)?$') {
|
|||||||
$gitHost = $matches[1]
|
$gitHost = $matches[1]
|
||||||
$path = $matches[2]
|
$path = $matches[2]
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($path) {
|
if ($path) {
|
||||||
$parts = $path.Split('/')
|
$parts = $path.Split('/')
|
||||||
if ($parts.Length -ge 2) {
|
if ($parts.Length -ge 2) {
|
||||||
@@ -158,6 +175,7 @@ if ($path) {
|
|||||||
$repoName = $parts[$parts.Length-1]
|
$repoName = $parts[$parts.Length-1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not $gitHost -or -not $owner -or -not $repoName) {
|
if (-not $gitHost -or -not $owner -or -not $repoName) {
|
||||||
Write-Host "Fehler: Konnte Host/Owner/Repo aus Remote-URL nicht ermitteln: $remoteUrl" -ForegroundColor Red
|
Write-Host "Fehler: Konnte Host/Owner/Repo aus Remote-URL nicht ermitteln: $remoteUrl" -ForegroundColor Red
|
||||||
exit 1
|
exit 1
|
||||||
@@ -165,7 +183,11 @@ if (-not $gitHost -or -not $owner -or -not $repoName) {
|
|||||||
|
|
||||||
# Tag erstellen und pushen
|
# Tag erstellen und pushen
|
||||||
git tag -a $newVersion -m "Release $newVersion"
|
git tag -a $newVersion -m "Release $newVersion"
|
||||||
if ($LASTEXITCODE -ne 0) { Write-Host "Tag-Erstellung fehlgeschlagen." -ForegroundColor Red; exit 1 }
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "Tag-Erstellung fehlgeschlagen." -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
git push origin $newVersion
|
git push origin $newVersion
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
Write-Host "Tag-Push fehlgeschlagen. Stelle sicher, dass Du Push-Rechte besitzt." -ForegroundColor Red
|
Write-Host "Tag-Push fehlgeschlagen. Stelle sicher, dass Du Push-Rechte besitzt." -ForegroundColor Red
|
||||||
@@ -195,6 +217,7 @@ $headers = @{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$releaseUri = "https://$gitHost/api/v1/repos/$owner/$repoName/releases"
|
$releaseUri = "https://$gitHost/api/v1/repos/$owner/$repoName/releases"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$release = Invoke-RestMethod -Uri $releaseUri -Method Post -Headers $headers -Body $releaseData -ErrorAction Stop
|
$release = Invoke-RestMethod -Uri $releaseUri -Method Post -Headers $headers -Body $releaseData -ErrorAction Stop
|
||||||
} catch {
|
} catch {
|
||||||
@@ -260,4 +283,3 @@ if (Test-Path $distPath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Release-Erstellung abgeschlossen!" -ForegroundColor Green
|
Write-Host "Release-Erstellung abgeschlossen!" -ForegroundColor Green
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,284 @@
|
|||||||
|
param(
|
||||||
|
[Parameter(Mandatory=$false)]
|
||||||
|
[string]$Token
|
||||||
|
)
|
||||||
|
|
||||||
|
# Token aus Umgebungsvariable laden falls nicht als Parameter übergeben
|
||||||
|
if (-not $Token) {
|
||||||
|
$Token = $env:GITEA_TOKEN
|
||||||
|
if (-not $Token) {
|
||||||
|
Write-Host "Fehler: Kein Token angegeben und GITEA_TOKEN Umgebungsvariable nicht gesetzt!" -ForegroundColor Red
|
||||||
|
Write-Host "Verwendung: .\create_release_simple.ps1 -Token 'your_token' oder setze GITEA_TOKEN Umgebungsvariable" -ForegroundColor Yellow
|
||||||
|
Write-Host "Das Script führt automatisch einen Build durch und lädt alle Artefakte hoch." -ForegroundColor Cyan
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
Write-Host "Token aus Umgebungsvariable GITEA_TOKEN geladen" -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "=== lib-privatebin Release Creator ===" -ForegroundColor Cyan
|
||||||
|
|
||||||
|
# Aktuelle Version ermitteln
|
||||||
|
$lastTag = git describe --tags --abbrev=0 2>$null
|
||||||
|
if (-not $lastTag) {
|
||||||
|
$lastTag = "v0.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Letzter Tag: $lastTag" -ForegroundColor Green
|
||||||
|
|
||||||
|
# Version parsen
|
||||||
|
if ($lastTag -match "^v(\d+)\.(\d+)\.(\d+)(.*)$") {
|
||||||
|
$major = [int]$matches[1]
|
||||||
|
$minor = [int]$matches[2]
|
||||||
|
$patch = [int]$matches[3]
|
||||||
|
$suffix = $matches[4]
|
||||||
|
|
||||||
|
$newPatch = $patch + 1
|
||||||
|
$newVersion = "v$major.$minor.$newPatch$suffix"
|
||||||
|
|
||||||
|
Write-Host "Neue Version: $newVersion" -ForegroundColor Green
|
||||||
|
} else {
|
||||||
|
Write-Host "Fehler: Ungültiges Versionsformat: $lastTag" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build durchführen
|
||||||
|
Write-Host "Führe Build durch..." -ForegroundColor Yellow
|
||||||
|
if (Test-Path "scripts\build_windows.bat") {
|
||||||
|
cmd /c scripts\build_windows.bat
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "Build fehlgeschlagen!" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "Fehler: scripts\build_windows.bat nicht gefunden!" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Build erfolgreich abgeschlossen!" -ForegroundColor Green
|
||||||
|
|
||||||
|
# Tests ausführen
|
||||||
|
Write-Host "Führe Tests aus..." -ForegroundColor Yellow
|
||||||
|
if (Test-Path "build\CTestTestfile.cmake") {
|
||||||
|
pushd build
|
||||||
|
try {
|
||||||
|
ctest -C Release --output-on-failure
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "Tests fehlgeschlagen!" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
Write-Host "Tests erfolgreich." -ForegroundColor Green
|
||||||
|
} else {
|
||||||
|
Write-Host "Warnung: Keine Tests gefunden." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
|
||||||
|
# Optional: clang-cl Coverage bauen und HTML-Report als Artefakt paketieren
|
||||||
|
Write-Host "Erzeuge optionalen Coverage-Report (clang-cl + LLVM), falls Tools vorhanden sind..." -ForegroundColor Yellow
|
||||||
|
try {
|
||||||
|
$llvmCov = "C:\Program Files\LLVM\bin\llvm-cov.exe"
|
||||||
|
$llvmProf = "C:\Program Files\LLVM\bin\llvm-profdata.exe"
|
||||||
|
$llvmCovExists = Test-Path $llvmCov
|
||||||
|
$llvmProfExists = Test-Path $llvmProf
|
||||||
|
|
||||||
|
if ($llvmCovExists -and $llvmProfExists) {
|
||||||
|
$toolchain = Join-Path $env:USERPROFILE 'vcpkg\scripts\buildsystems\vcpkg.cmake'
|
||||||
|
$haveToolchain = Test-Path $toolchain
|
||||||
|
|
||||||
|
$cmakeArgs = @(
|
||||||
|
'-S','.',
|
||||||
|
'-B','build-clang',
|
||||||
|
'-G','Visual Studio 17 2022',
|
||||||
|
'-A','x64',
|
||||||
|
'-T','ClangCL',
|
||||||
|
'-DENABLE_LLVM_COVERAGE=ON',
|
||||||
|
("-DLLVM_PROFDATA={0}" -f $llvmProf),
|
||||||
|
("-DLLVM_COV={0}" -f $llvmCov)
|
||||||
|
)
|
||||||
|
|
||||||
|
if ($haveToolchain) {
|
||||||
|
$cmakeArgs += ("-DCMAKE_TOOLCHAIN_FILE={0}" -f $toolchain)
|
||||||
|
$cmakeArgs += '-DVCPKG_TARGET_TRIPLET=x64-windows'
|
||||||
|
}
|
||||||
|
|
||||||
|
& cmake @cmakeArgs | Out-Null
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "CMake-Konfiguration für Coverage fehlgeschlagen"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run coverage target with integration tests disabled to avoid rate limits
|
||||||
|
$env:PRIVATEBIN_IT = '0'
|
||||||
|
& cmake --build build-clang --config Release --target coverage_llvm
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "Coverage-Build fehlgeschlagen"
|
||||||
|
}
|
||||||
|
|
||||||
|
$htmlDir = "build-clang\coverage\html"
|
||||||
|
if (Test-Path $htmlDir) {
|
||||||
|
if (-not (Test-Path 'dist')) {
|
||||||
|
New-Item -ItemType Directory -Path 'dist' | Out-Null
|
||||||
|
}
|
||||||
|
$zipPath = "dist\coverage_html.zip"
|
||||||
|
if (Test-Path $zipPath) {
|
||||||
|
Remove-Item -Force $zipPath
|
||||||
|
}
|
||||||
|
Compress-Archive -Path "$htmlDir\*" -DestinationPath $zipPath
|
||||||
|
Write-Host "Coverage-HTML nach $zipPath gepackt." -ForegroundColor Green
|
||||||
|
} else {
|
||||||
|
Write-Host "Hinweis: Kein Coverage-HTML-Verzeichnis gefunden (Tests evtl. ohne Ausführungspfad)." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "LLVM-Tools nicht gefunden; überspringe Coverage (erwartet: $llvmCov / $llvmProf)." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Host "Warnung: Coverage-Erzeugung fehlgeschlagen: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
|
||||||
|
# Commit & Push, Tag & Push
|
||||||
|
# Änderungen committen
|
||||||
|
$status = git status --porcelain
|
||||||
|
if ($status) {
|
||||||
|
git add -A
|
||||||
|
git commit -m "Release $newVersion prepare for release"
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "Commit fehlgeschlagen." -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remote/Repo-Infos ermitteln
|
||||||
|
$remoteUrl = git remote get-url origin 2>$null
|
||||||
|
if (-not $remoteUrl) {
|
||||||
|
Write-Host "Fehler: Kein Git-Remote 'origin' gefunden." -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Host, Owner, Repo aus URL extrahieren (https oder ssh)
|
||||||
|
$gitHost = $null
|
||||||
|
$owner = $null
|
||||||
|
$repoName = $null
|
||||||
|
|
||||||
|
if ($remoteUrl -match '^(https?://)([^/]+)/(.+?)(?:\.git)?$') {
|
||||||
|
$gitHost = $matches[2]
|
||||||
|
$path = $matches[3]
|
||||||
|
} elseif ($remoteUrl -match '^[^@]+@([^:]+):(.+?)(?:\.git)?$') {
|
||||||
|
$gitHost = $matches[1]
|
||||||
|
$path = $matches[2]
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($path) {
|
||||||
|
$parts = $path.Split('/')
|
||||||
|
if ($parts.Length -ge 2) {
|
||||||
|
$owner = $parts[$parts.Length-2]
|
||||||
|
$repoName = $parts[$parts.Length-1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $gitHost -or -not $owner -or -not $repoName) {
|
||||||
|
Write-Host "Fehler: Konnte Host/Owner/Repo aus Remote-URL nicht ermitteln: $remoteUrl" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tag erstellen und pushen
|
||||||
|
git tag -a $newVersion -m "Release $newVersion"
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "Tag-Erstellung fehlgeschlagen." -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
git push origin $newVersion
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "Tag-Push fehlgeschlagen. Stelle sicher, dass Du Push-Rechte besitzt." -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Vor Upload: Artefakte einsammeln (dist)
|
||||||
|
if (Test-Path "scripts\collect_binaries.ps1") {
|
||||||
|
Write-Host "Sammle Build-Artefakte (scripts/collect_binaries.ps1)..." -ForegroundColor Yellow
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\collect_binaries.ps1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Release erstellen
|
||||||
|
$releaseBody = "## What is New in $newVersion`n`n- AUTOMATED: Release created by script`n- VERSION: Bumped from $lastTag to $newVersion`n- BUILD: Automatic build with build_windows.bat`n`n## Build Artifacts`n`nBuild-Artefakte werden automatisch hochgeladen und hier angezeigt.`n`nTypische Artefakte:`n- privatebinapi.dll - Windows Dynamic Link Library`n- privatebinapi.lib - Windows Import Library`n- example.exe - Combined example program`n- privatebinapi.h - C++ header file"
|
||||||
|
|
||||||
|
$releaseData = @{
|
||||||
|
tag_name = $newVersion
|
||||||
|
name = "$newVersion - Automated Release"
|
||||||
|
body = $releaseBody
|
||||||
|
draft = $false
|
||||||
|
prerelease = $false
|
||||||
|
} | ConvertTo-Json -Depth 10
|
||||||
|
|
||||||
|
$headers = @{
|
||||||
|
"Authorization" = "token $Token"
|
||||||
|
"Content-Type" = "application/json"
|
||||||
|
}
|
||||||
|
|
||||||
|
$releaseUri = "https://$gitHost/api/v1/repos/$owner/$repoName/releases"
|
||||||
|
|
||||||
|
try {
|
||||||
|
$release = Invoke-RestMethod -Uri $releaseUri -Method Post -Headers $headers -Body $releaseData -ErrorAction Stop
|
||||||
|
} catch {
|
||||||
|
Write-Host "Fehler beim Erstellen des Releases: $($_.Exception.Message)" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Release erstellt: $($release.id)" -ForegroundColor Green
|
||||||
|
Write-Host "URL: $($release.html_url)" -ForegroundColor Green
|
||||||
|
|
||||||
|
# Build-Artefakte zum Release hinzufügen
|
||||||
|
Write-Host "Füge Build-Artefakte hinzu..." -ForegroundColor Yellow
|
||||||
|
|
||||||
|
# Artefakte aus dem dist-Ordner finden
|
||||||
|
$distPath = "dist"
|
||||||
|
if (Test-Path $distPath) {
|
||||||
|
$artifacts = Get-ChildItem -Path $distPath -Recurse -File | Where-Object {
|
||||||
|
$_.Extension -match "\.(dll|lib|exe|h|zip)$"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($artifacts) {
|
||||||
|
Write-Host "Gefundene Artefakte:" -ForegroundColor Green
|
||||||
|
foreach ($artifact in $artifacts) {
|
||||||
|
Write-Host " - $($artifact.Name)" -ForegroundColor White
|
||||||
|
}
|
||||||
|
|
||||||
|
# Artefakte hochladen
|
||||||
|
foreach ($artifact in $artifacts) {
|
||||||
|
Write-Host "Lade hoch: $($artifact.Name)..." -ForegroundColor Yellow
|
||||||
|
|
||||||
|
$uploadUri = "https://$gitHost/api/v1/repos/$owner/$repoName/releases/$($release.id)/assets"
|
||||||
|
|
||||||
|
$boundary = [System.Guid]::NewGuid().ToString()
|
||||||
|
$LF = "`r`n"
|
||||||
|
$bodyLines = @(
|
||||||
|
"--$boundary",
|
||||||
|
"Content-Disposition: form-data; name=`"attachment`"; filename=`"$($artifact.Name)`"",
|
||||||
|
"Content-Type: application/octet-stream",
|
||||||
|
"",
|
||||||
|
[System.IO.File]::ReadAllBytes($artifact.FullName),
|
||||||
|
"--$boundary--"
|
||||||
|
)
|
||||||
|
|
||||||
|
$body = $bodyLines -join $LF
|
||||||
|
|
||||||
|
$uploadHeaders = @{
|
||||||
|
"Authorization" = "token $Token"
|
||||||
|
"Content-Type" = "multipart/form-data; boundary=$boundary"
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$uploadResponse = Invoke-RestMethod -Uri $uploadUri -Method Post -Headers $uploadHeaders -Body $body
|
||||||
|
Write-Host " ✓ $($artifact.Name) erfolgreich hochgeladen" -ForegroundColor Green
|
||||||
|
} catch {
|
||||||
|
Write-Host " ✗ Fehler beim Hochladen von $($artifact.Name): $($_.Exception.Message)" -ForegroundColor Red
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "Keine Build-Artefakte im dist-Ordner gefunden!" -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "dist-Ordner nicht gefunden!" -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Release-Erstellung erfolgreich abgeschlossen!" -ForegroundColor Green
|
||||||
Reference in New Issue
Block a user