mirror of
https://github.com/wiiu-env/CURLWrapperModule.git
synced 2024-11-21 20:29:19 +01:00
Log the module version on each application start
This commit is contained in:
parent
b73132ea61
commit
624c3a00f9
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -18,6 +18,13 @@ jobs:
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: create version.h
|
||||
run: |
|
||||
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
||||
cat <<EOF > ./src/version.h
|
||||
#pragma once
|
||||
#define MODULE_VERSION_EXTRA " (nightly-$git_hash)"
|
||||
EOF
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -t builder
|
||||
|
7
.github/workflows/pr.yml
vendored
7
.github/workflows/pr.yml
vendored
@ -15,6 +15,13 @@ jobs:
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: create version.h
|
||||
run: |
|
||||
git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
|
||||
cat <<EOF > ./src/version.h
|
||||
#pragma once
|
||||
#define MODULE_VERSION_EXTRA " (nightly-$git_hash)"
|
||||
EOF
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -t builder
|
||||
|
@ -6,12 +6,16 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
#include "cacert_pem.h"
|
||||
#include "version.h"
|
||||
#include <curl/mprintf.h>
|
||||
#include <wums.h>
|
||||
|
||||
WUMS_MODULE_EXPORT_NAME("homebrew_curlwrapper");
|
||||
|
||||
#define MODULE_VERSION "v0.1"
|
||||
|
||||
WUMS_APPLICATION_STARTS() {
|
||||
OSReport("Running CURLWrapperModule " MODULE_VERSION MODULE_VERSION_EXTRA "\n");
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
}
|
||||
|
||||
|
2
src/version.h
Normal file
2
src/version.h
Normal file
@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
#define MODULE_VERSION_EXTRA ""
|
Loading…
Reference in New Issue
Block a user