Add binaries to binary branch instead of master (#441)

This commit is contained in:
iranl
2024-08-01 13:44:23 +02:00
committed by GitHub
parent cccca46601
commit f57a9625b7
12 changed files with 213 additions and 66 deletions

12
pio_package_pre.py Normal file
View File

@@ -0,0 +1,12 @@
import re, shutil, os
from datetime import datetime, timezone
regex = r"\#define NUKI_HUB_DATE \"(.*)\""
content_new = ""
with open ('src/Config.h', 'r' ) as readfile:
file_content = readfile.read()
content_new = re.sub(regex, "#define NUKI_HUB_DATE \"" + datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S") + "\"", file_content, flags = re.M)
with open('src/Config.h', 'w') as writefile:
writefile.write(content_new)