mirror of
https://github.com/wiiu-env/SDHotSwapModule.git
synced 2025-02-17 11:06:18 +01:00
Log the module version on each application start
This commit is contained in:
parent
8c6431185f
commit
0fe25e2ad8
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 > ./source/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
@ -26,6 +26,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 > ./source/version.h
|
||||
#pragma once
|
||||
#define MODULE_VERSION_EXTRA " (nightly-$git_hash)"
|
||||
EOF
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -t builder
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "exports.h"
|
||||
#include "logger.h"
|
||||
#include "sdcard.h"
|
||||
#include "version.h"
|
||||
#include <condition_variable>
|
||||
#include <coreinit/cache.h>
|
||||
#include <coreinit/filesystem.h>
|
||||
@ -22,6 +23,9 @@ std::thread *mountThread = nullptr;
|
||||
bool sStopThread = false;
|
||||
bool sIsSDInsertedAndMounted = false;
|
||||
|
||||
#define MODULE_VERSION "v0.1"
|
||||
#define MODULE_VERSION_FULL MODULE_VERSION MODULE_VERSION_EXTRA
|
||||
|
||||
int mount_thread() {
|
||||
std::unique_lock<std::mutex> lk(*cv_m);
|
||||
// Wait until the main thread has checked the sd status once.
|
||||
@ -49,6 +53,7 @@ int mount_thread() {
|
||||
}
|
||||
|
||||
WUMS_APPLICATION_STARTS() {
|
||||
OSReport("Running SDHotSwapModule " MODULE_VERSION_FULL "\n");
|
||||
initLogging();
|
||||
|
||||
sStopThread = false;
|
||||
|
2
source/version.h
Normal file
2
source/version.h
Normal file
@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
#define MODULE_VERSION_EXTRA ""
|
Loading…
x
Reference in New Issue
Block a user