Update the version and add support using the git hash on nightlies

This commit is contained in:
Maschell 2022-09-19 13:32:05 +02:00
parent 79522dc356
commit c40df1a909
5 changed files with 24 additions and 3 deletions

View File

@ -18,6 +18,13 @@ jobs:
needs: clang-format needs: clang-format
steps: steps:
- uses: actions/checkout@v2 - 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 - name: build binary
run: | run: |
docker build . -t builder docker build . -t builder

View File

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

View File

@ -1,3 +1,4 @@
#include "main.h"
#include "BackgroundThread.hpp" #include "BackgroundThread.hpp"
#include "utils/logger.h" #include "utils/logger.h"
#include "virtualpath.h" #include "virtualpath.h"
@ -9,7 +10,7 @@
WUPS_PLUGIN_NAME("FTPiiU"); WUPS_PLUGIN_NAME("FTPiiU");
WUPS_PLUGIN_DESCRIPTION("FTP Server"); WUPS_PLUGIN_DESCRIPTION("FTP Server");
WUPS_PLUGIN_VERSION("0.1"); WUPS_PLUGIN_VERSION(VERSION_FULL_RAW);
WUPS_PLUGIN_AUTHOR("Maschell"); WUPS_PLUGIN_AUTHOR("Maschell");
WUPS_PLUGIN_LICENSE("GPL"); WUPS_PLUGIN_LICENSE("GPL");

View File

@ -7,11 +7,15 @@ extern "C" {
#endif #endif
#include "net.h" #include "net.h"
#include "version.h"
#include <stdint.h> #include <stdint.h>
#define MAXPATHLEN 256 #define MAXPATHLEN 256
#define wiiu_geterrno() (errno) #define VERSION_RAW "0.1.1"
#define VERSION_FULL_RAW VERSION_RAW VERSION_EXTRA
#define wiiu_geterrno() (errno)
//! C wrapper for our C++ functions //! C wrapper for our C++ functions
int Menu_Main(void); int Menu_Main(void);

2
src/version.h Normal file
View File

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