Compare commits

..

5 Commits

Author SHA1 Message Date
dependabot[bot]
9f0b4b8a4a Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 20:58:17 +02:00
Maschell
ecb0bdf358 Create dependabot.yml 2023-07-23 10:18:05 +02:00
Maschell
6e48f46df4 Bump version 2023-07-19 19:07:56 +02:00
Maschell
0fe25e2ad8 Log the module version on each application start 2023-07-19 19:07:56 +02:00
Maschell
8c6431185f Update Dockerfile 2023-07-19 16:18:51 +02:00
6 changed files with 37 additions and 6 deletions

10
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View File

@ -9,7 +9,7 @@ jobs:
clang-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: clang-format
run: |
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./source
@ -17,7 +17,14 @@ jobs:
runs-on: ubuntu-22.04
needs: clang-format
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- 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

View File

@ -6,7 +6,7 @@ jobs:
clang-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: clang-format
run: |
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./source
@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-22.04
needs: clang-format
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: build binary with logging
run: |
docker build . -t builder
@ -25,7 +25,14 @@ jobs:
runs-on: ubuntu-22.04
needs: clang-format
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- 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

View File

@ -1,6 +1,6 @@
FROM ghcr.io/wiiu-env/devkitppc:20230621
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20230622 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20230719 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/libsdutils:20230621 /artifacts $DEVKITPRO
WORKDIR project

View File

@ -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.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
View File

@ -0,0 +1,2 @@
#pragma once
#define MODULE_VERSION_EXTRA ""