Skip to content

Commit

Permalink
Merge pull request #182 from th3dstudio/2.0.x
Browse files Browse the repository at this point in the history
2.0.x
  • Loading branch information
houseofbugs authored Dec 27, 2023
2 parents c951208 + 7f5f2da commit c47b3ed
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#pragma once
#define CONFIGURATION_H_VERSION 02010200

#define UNIFIED_VERSION "UF 2.83"
#define STRING_DISTRIBUTION_DATE "2023-12-14"
#define UNIFIED_VERSION "TH3D UFW 2.83a"
#define STRING_DISTRIBUTION_DATE "2023-12-27"

//#@CONFIGURATION_START_FLAG

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#pragma once
#define CONFIGURATION_H_VERSION 02010200

#define UNIFIED_VERSION "UF 2.83"
#define STRING_DISTRIBUTION_DATE "2023-12-14"
#define UNIFIED_VERSION "TH3D UFW 2.83a"
#define STRING_DISTRIBUTION_DATE "2023-12-27"

//#@CONFIGURATION_START_FLAG

Expand Down
4 changes: 2 additions & 2 deletions Board_Configs/TH3D_EZBoardV2/Firmware/Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#pragma once
#define CONFIGURATION_H_VERSION 02010200

#define UNIFIED_VERSION "UF 2.83"
#define STRING_DISTRIBUTION_DATE "2023-12-14"
#define UNIFIED_VERSION "TH3D UFW 2.83a"
#define STRING_DISTRIBUTION_DATE "2023-12-27"

//#@CONFIGURATION_START_FLAG

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#pragma once
#define CONFIGURATION_H_VERSION 02010200

#define UNIFIED_VERSION "UF 2.83"
#define STRING_DISTRIBUTION_DATE "2023-12-14"
#define UNIFIED_VERSION "TH3D UFW 2.83a"
#define STRING_DISTRIBUTION_DATE "2023-12-27"

//#@CONFIGURATION_START_FLAG

Expand Down
4 changes: 3 additions & 1 deletion Firmware/Marlin/Configuration_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
//======================= DO NOT MODIFY THIS FILE ===========================
//===========================================================================

// Version and Date information is now in the Configuration.h files at the top.
#ifndef UNIFIED_VERSION
#define UNIFIED_VERSION "TH3D UFW 2.83a"
#endif

/**
* ABL Probe Settings
Expand Down
2 changes: 1 addition & 1 deletion Firmware/ini/features.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ USES_LIQUIDCRYSTAL_I2C = marcoschwartz/[email protected]
USES_LIQUIDTWI2 = [email protected]
HAS_LCDPRINT = src_filter=+<src/lcd/lcdprint.cpp>
HAS_MARLINUI_HD44780 = src_filter=+<src/lcd/HD44780>
HAS_MARLINUI_U8GLIB = marlinfirmware/U8glib-HAL@~0.5.2
HAS_MARLINUI_U8GLIB = marlinfirmware/[email protected]
src_filter=+<src/lcd/dogm>
HAS_(FSMC|SPI|LTDC)_TFT = src_filter=+<src/HAL/STM32/tft> +<src/HAL/STM32F1/tft> +<src/lcd/tft_io>
HAS_FSMC_TFT = src_filter=+<src/HAL/STM32/tft/tft_fsmc.cpp> +<src/HAL/STM32F1/tft/tft_fsmc.cpp>
Expand Down
10 changes: 9 additions & 1 deletion Internal Tools/STEP1-UpdateVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def update_version_info(file_path, new_version, new_build_date):
content = file.read()

# Update UNIFIED_VERSION
content = re.sub(r'#define UNIFIED_VERSION "(.*?)"', f'#define UNIFIED_VERSION "UF {new_version}"', content)
content = re.sub(r'#define UNIFIED_VERSION "(.*?)"', f'#define UNIFIED_VERSION "TH3D UFW {new_version}"', content)

# Update STRING_DISTRIBUTION_DATE
content = re.sub(r'#define STRING_DISTRIBUTION_DATE "(.*?)"', f'#define STRING_DISTRIBUTION_DATE "{new_build_date}"', content)
Expand All @@ -25,6 +25,10 @@ def update_version_in_folders(root_directories, new_version, new_build_date):
update_version_info(file_path, new_version, new_build_date)
print(f"Updated {file_path}")

def update_version_in_file(file_path, new_version, new_build_date):
update_version_info(file_path, new_version, new_build_date)
print(f"Updated {file_path}")

def main():
new_version = input("Enter the new version number: ")
new_build_date = datetime.now().strftime("%Y-%m-%d")
Expand All @@ -35,7 +39,11 @@ def main():
r'D:\Work\GitHub\UnifiedPaidConfigs\Board_Configs'
]

# Additional file to update
additional_file_path = r'D:\Work\GitHub\UnifiedFirmware\Firmware\Marlin\Configuration_backend.h'

update_version_in_folders(root_directories, new_version, new_build_date)
update_version_in_file(additional_file_path, new_version, new_build_date)

if __name__ == "__main__":
main()

0 comments on commit c47b3ed

Please sign in to comment.