Add the git-hash to the version if using a nightly build

This commit is contained in:
Maschell 2022-09-19 15:14:46 +02:00
parent bdaf8f1a07
commit 3dfa9ffca0
5 changed files with 21 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

@ -15,6 +15,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,7 +1,11 @@
#pragma once
#include "version.h"
#include <coreinit/mcp.h>
#define VERSION "v0.1"
#define VERSION_FULL VERSION VERSION_EXTRA
extern int gForceSettingsEnabled;
enum Lanuages {

View File

@ -16,7 +16,7 @@
WUPS_PLUGIN_NAME("Region Free Plugin");
WUPS_PLUGIN_DESCRIPTION("Allows the user to load titles from other regions");
WUPS_PLUGIN_VERSION("0.1");
WUPS_PLUGIN_VERSION(VERSION_FULL);
WUPS_PLUGIN_AUTHOR("Maschell");
WUPS_PLUGIN_LICENSE("GPL");

2
src/version.h Normal file
View File

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