File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed
Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1818 needs : clang-format
1919 steps :
2020 - uses : actions/checkout@v3
21+ - name : create version.h
22+ run : |
23+ git_hash=$(git rev-parse --short "$GITHUB_SHA")
24+ cat <<EOF > ./src/version.h
25+ #pragma once
26+ #define MODULE_VERSION_EXTRA " (nightly-$git_hash)"
27+ EOF
2128 - name : build binary
2229 run : |
2330 docker build . -t builder
Original file line number Diff line number Diff line change 1515 needs : clang-format
1616 steps :
1717 - uses : actions/checkout@v3
18+ - name : create version.h
19+ run : |
20+ git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
21+ cat <<EOF > ./src/version.h
22+ #pragma once
23+ #define MODULE_VERSION_EXTRA " (nightly-$git_hash)"
24+ EOF
1825 - name : build binary
1926 run : |
2027 docker build . -t builder
Original file line number Diff line number Diff line change @@ -6,12 +6,16 @@ extern "C" {
66}
77#endif
88#include " cacert_pem.h"
9+ #include " version.h"
910#include < curl/mprintf.h>
1011#include < wums.h>
1112
1213WUMS_MODULE_EXPORT_NAME (" homebrew_curlwrapper" );
1314
15+ #define MODULE_VERSION " v0.1"
16+
1417WUMS_APPLICATION_STARTS () {
18+ OSReport (" Running CURLWrapperModule " MODULE_VERSION MODULE_VERSION_EXTRA " \n " );
1519 curl_global_init (CURL_GLOBAL_ALL);
1620}
1721
Original file line number Diff line number Diff line change 1+ #pragma once
2+ #define MODULE_VERSION_EXTRA ""
You can’t perform that action at this time.
0 commit comments