From 9b46e9b24d4a609c124cda8549dd04411c7fd03a Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Sat, 15 Jul 2023 23:54:56 +0200 Subject: [PATCH 1/3] Update version with first beta of v2.8.0 (v2.7.0 was created based on previous commit) --- C4.puml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4.puml b/C4.puml index ec5a0a86..d98649f4 100644 --- a/C4.puml +++ b/C4.puml @@ -4,7 +4,7 @@ ' ################################## !function C4Version() ' 2 spaces and ' are used as unique marker, that the release scripts makes the correct version update - !$c4Version = "2.6.1beta1" + !$c4Version = "2.8.0beta1" !return $c4Version !end function From 7ab9cdfcc3e9de71d7c8d1b39b7c7030da4c5edf Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Sat, 15 Jul 2023 23:59:50 +0200 Subject: [PATCH 2/3] release helper script .scripts/transform_files.py updates theme references in all *.md and *.puml files too (already used with v2.7.0) --- .scripts/transform_files.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.scripts/transform_files.py b/.scripts/transform_files.py index e16b96ce..c18e8a24 100644 --- a/.scripts/transform_files.py +++ b/.scripts/transform_files.py @@ -229,7 +229,7 @@ def update_c4_next_beta_version(): def update_all_includes(): # reference tag version is with starting 'v' - print(f"updating include paths with new tag version {release_version} ...") + print(f"updating include/theme paths with new tag version {release_version} ...") files = glob.glob("./**/*", recursive=True) for file in files: if file.endswith(".puml") or file.endswith(".md"): @@ -239,8 +239,17 @@ def update_all_includes(): "!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/", f"!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/{release_version}/", ) - - print("include paths updated") + replace_in_file( + file, + "from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/", + f"from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/{release_version}/", + ) + replace_in_file( + file, + "](https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/themes/", + f"](https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/{release_version}/themes/", + ) + print(f"include/theme paths updated") def process_url_match(m: re.Match[str]): @@ -254,6 +263,14 @@ def process_url_match(m: re.Match[str]): "!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/", new_path, ) + replaced = replaced.replace( + "from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/", + f"from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/{release_version}/", + ) + replaced = replaced.replace( + "](https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/themes/", + f"](https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/{release_version}/themes/", + ) if new_path not in replaced: global found_not_replaced_include From f2eb02de9d8082d1e4fcfec19ddeb19f79493c03 Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Sun, 16 Jul 2023 01:26:17 +0200 Subject: [PATCH 3/3] release helper script .scripts/transform_files.py deploys C4_Sequence.puml file to plantuml-stdlib too (already used with v2.7.0) --- .scripts/transform_files.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.scripts/transform_files.py b/.scripts/transform_files.py index c18e8a24..569fb327 100644 --- a/.scripts/transform_files.py +++ b/.scripts/transform_files.py @@ -387,6 +387,12 @@ def create_plantuml_stdlib_c4_folder(target_path): inclusive_endif, "!include ", ) + replace_first_regex_copy_file( + "C4_Sequence.puml", + os.path.join(target_path, "C4_Sequence.puml"), + inclusive_endif, + "!include ", + ) replace_first_regex_copy_file( "./.scripts/plantuml_stdlib_info.txt",