rename version.h

This commit is contained in:
proddy
2025-03-30 14:50:40 +02:00
parent b29136433d
commit 3571998da3
6 changed files with 6 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ jobs:
- name: Get EMS-ESP version - name: Get EMS-ESP version
id: build_info id: build_info
run: | run: |
version=`grep -E '^#define EMSESP_APP_VERSION' ./src/version.h | awk -F'"' '{print $2}'` version=`grep -E '^#define EMSESP_APP_VERSION' ./src/emsesp_version.h | awk -F'"' '{print $2}'`
echo "VERSION=$version" >> $GITHUB_OUTPUT echo "VERSION=$version" >> $GITHUB_OUTPUT
- name: Install PlatformIO - name: Install PlatformIO

View File

@@ -28,7 +28,7 @@ jobs:
- name: Get EMS-ESP source code and version - name: Get EMS-ESP source code and version
id: build_info id: build_info
run: | run: |
version=`grep -E '^#define EMSESP_APP_VERSION' ./src/version.h | awk -F'"' '{print $2}'` version=`grep -E '^#define EMSESP_APP_VERSION' ./src/emsesp_version.h | awk -F'"' '{print $2}'`
echo "VERSION=$version" >> $GITHUB_OUTPUT echo "VERSION=$version" >> $GITHUB_OUTPUT
- name: Install PlatformIO - name: Install PlatformIO

View File

@@ -9,10 +9,10 @@ OUTPUT_DIR = "build{}".format(os.path.sep)
def bin_copy(source, target, env): def bin_copy(source, target, env):
# get the application version from version.h # get the application version from emsesp_version.h
bag = {} bag = {}
exprs = [(re.compile(r'^#define EMSESP_APP_VERSION\s+"(\S+)"'), 'app_version')] exprs = [(re.compile(r'^#define EMSESP_APP_VERSION\s+"(\S+)"'), 'app_version')]
with open('./src/version.h', 'r') as f: with open('./src/emsesp_version.h', 'r') as f:
for l in f.readlines(): for l in f.readlines():
for expr, var in exprs: for expr, var in exprs:
m = expr.match(l) m = expr.match(l)

View File

@@ -11,7 +11,7 @@ def move_file(source, target, env):
# get the build info # get the build info
bag = {} bag = {}
exprs = [(re.compile(r'^#define EMSESP_APP_VERSION\s+"(\S+)"'), 'app_version')] exprs = [(re.compile(r'^#define EMSESP_APP_VERSION\s+"(\S+)"'), 'app_version')]
with open('./src/version.h', 'r') as f: with open('./src/emsesp_version.h', 'r') as f:
for l in f.readlines(): for l in f.readlines():
for expr, var in exprs: for expr, var in exprs:
m = expr.match(l) m = expr.match(l)

View File

@@ -71,7 +71,7 @@
#include "roomcontrol.h" #include "roomcontrol.h"
#include "command.h" #include "command.h"
#include "../version.h" #include "../emsesp_version.h"
// Load external modules // Load external modules
class Module {}; // forward declaration class Module {}; // forward declaration