Add version defines (#788)

This commit is contained in:
Earle F. Philhower, III authored and GitHub committed 2025-10-20 08:44:57 -07:00
1 parent 7704d78dc9
commit e2f215cea3
3 files changed
+15

No files matched your search

+2
View File
@@ -2,6 +2,8 @@
// In general a user should only include the specific headers they need
// to miniimize build times.
#include "ESP8266AudioVer.h"
// Input stage
#include "AudioFileSourceBuffer.h"
#include "AudioFileSourceFATFS.h"
+5
View File
@@ -0,0 +1,5 @@
#pragma once
#define ESP8266AUDIO_MAJOR 2
#define ESP8266AUDIO_MINOR 3
#define ESP8266AUDIO_REVISION 0
#define ESP8266AUDIO_VERSION_STR "2.3.0"
+8
View File
@@ -38,4 +38,12 @@ def main():
json.dump(library, fout, indent = 4);
shutil.move("library.json.new", "library.json")
# src/ESP8266AudioVer.h
with open("src/ESP8266AudioVer.h", "w") as fout:
fout.write("#pragma once\n")
fout.write("#define ESP8266AUDIO_MAJOR " + str(major) + "\n")
fout.write("#define ESP8266AUDIO_MINOR " + str(minor) + "\n")
fout.write("#define ESP8266AUDIO_REVISION " + str(sub) + "\n")
fout.write('#define ESP8266AUDIO_VERSION_STR "' + str(args.version) + '"' + "\n")
main()