diff --git a/ESP/platformio.ini b/ESP/platformio.ini index 88babfe..4e3b082 100644 --- a/ESP/platformio.ini +++ b/ESP/platformio.ini @@ -224,7 +224,6 @@ monitor_filters = esp32_exception_decoder board_build.partitions = min_spiffs.csv build_flags = - !python tools/autoversioning.py !python tools/git_rev.py -DENABLE_ADHOC=${wifi.enableadhoc} diff --git a/ESP/tools/autoversioning.py b/ESP/tools/autoversioning.py deleted file mode 100644 index 2a8c198..0000000 --- a/ESP/tools/autoversioning.py +++ /dev/null @@ -1,28 +0,0 @@ -FILENAME_VERSION = 'tools/version.txt' -build_no = 'v0.0.0' -try: - with open(FILENAME_VERSION) as f: - build_no = f.readline() - if build_no == '': - raise Exception("Empty file") - version = build_no.split('v') - version = version[1].split('.') - first_num = int(version[0]) - second_num = int(version[1]) - last_num = int(version[2]) - if last_num <= 9: - last_num += 1 - elif second_num <= 9 and last_num >= 9: - second_num += 1 - elif second_num and last_num >= 9: - first_num += 1 - second_num = 0 - last_num = 0 - else: - raise Exception("Invalid version number") - build_no = 'v' + str(first_num) + '.' + str(second_num) + '.' + str(last_num) -except: - build_no = "v0.0.1" -with open(FILENAME_VERSION, 'w+') as f: - f.write(build_no) -print("-DVERSION={0}".format(build_no)) diff --git a/ESP/tools/git_rev.py b/ESP/tools/git_rev.py index 4b8d261..bbdc837 100644 --- a/ESP/tools/git_rev.py +++ b/ESP/tools/git_rev.py @@ -7,8 +7,8 @@ project = project.split("/") project = project[len(project)-1] # Get 0.0.0 version from latest Git tag -#tagcmd = "git describe --tags --abbrev=0" -#version = subprocess.check_output(tagcmd, shell=True).decode().strip() +tagcmd = "git describe --tags --abbrev=0" +version = subprocess.check_output(tagcmd, shell=True).decode().strip() # Get latest commit short from Git revcmd = "git log --pretty=format:'%h' -n 1" @@ -20,6 +20,6 @@ branch = subprocess.check_output(branchcmd, shell=True).decode().strip() # Make all available for use in the macros print("-DPIO_SRC_NAM={0}".format(project)) -#print("-DPIO_SRC_TAG={0}".format(version)) +print("-DPIO_SRC_TAG={0}".format(version)) print("-DPIO_SRC_REV={0}".format(commit)) print("-DPIO_SRC_BRH={0}".format(branch)) \ No newline at end of file