diff --git a/src/ESP8266Audio.h b/src/ESP8266Audio.h index 9fdeb91..c965755 100644 --- a/src/ESP8266Audio.h +++ b/src/ESP8266Audio.h @@ -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" diff --git a/src/ESP8266AudioVer.h b/src/ESP8266AudioVer.h new file mode 100644 index 0000000..734182e --- /dev/null +++ b/src/ESP8266AudioVer.h @@ -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" diff --git a/tools/makever.py b/tools/makever.py index 7ae3f47..d077cad 100755 --- a/tools/makever.py +++ b/tools/makever.py @@ -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()