Set the correct version

This commit is contained in:
Maschell 2022-09-19 21:20:31 +02:00
parent 1faaab0980
commit 53f995dabc
5 changed files with 24 additions and 1 deletions

View File

@ -18,6 +18,13 @@ jobs:
needs: clang-format
steps:
- uses: actions/checkout@v2
- name: create version.h
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
cat <<EOF > ./src/version.h
#pragma once
#define VERSION_EXTRA " (nightly-$git_hash)"
EOF
- name: build binary
run: |
docker build . -t builder

View File

@ -26,6 +26,13 @@ jobs:
needs: clang-format
steps:
- uses: actions/checkout@v2
- 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 VERSION_EXTRA " (nightly-$git_hash)"
EOF
- name: build binary
run: |
docker build . -t builder

View File

@ -1,3 +1,4 @@
#include "main.h"
#include "FileInfos.h"
#include "SaveRedirection.h"
#include "filelist.h"
@ -38,7 +39,7 @@ typedef struct ACPMetaData {
WUPS_PLUGIN_NAME("Homebrew in Wii U menu");
WUPS_PLUGIN_DESCRIPTION("Allows the user to load homebrew from the Wii U menu");
WUPS_PLUGIN_VERSION("0.1");
WUPS_PLUGIN_VERSION(VERSION_FULL);
WUPS_PLUGIN_AUTHOR("Maschell");
WUPS_PLUGIN_LICENSE("GPL");

6
src/main.h Normal file
View File

@ -0,0 +1,6 @@
#pragma once
#include "version.h"
#define VERSION "v0.1.1"
#define VERSION_FULL VERSION VERSION_EXTRA

2
src/version.h Normal file
View File

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