@@ -56,16 +56,37 @@ steps:
5656 to : src/pr_module.cpp
5757 - copy : .github/pragma_module_info.json.tmpl
5858 to : .github/pragma_module_info.json
59- - copy : CMakeLists.txt.tmpl
60- to : CMakeLists.txt
6159 - copy : examples/ex_load_pragma_module.tmpl.lua
6260 to : examples/ex_load_pragma_module.lua
6361
62+ - write : |
63+ module_type raw: {{ module_type }}
64+ module_type_norm: {{ module_type | trim | lowercase }}
65+ match_shared: {{ module_type | matches: "(?i)^shared$" }}
66+ match_client: {{ module_type | matches: "(?i)^client$" }}
67+ match_server: {{ module_type | matches: "(?i)^server$" }}
68+ to: tmplr-debug.txt
69+
70+ - if :
71+ eval : ' {{ module_type | matches: server }}'
72+ copy : CMakeLists.server.txt.tmpl
73+ to : CMakeLists.txt
74+ else :
75+ if :
76+ eval : ' {{ module_type | matches: client }}'
77+ copy : CMakeLists.client.txt.tmpl
78+ to : CMakeLists.txt
79+ else :
80+ copy : CMakeLists.shared.txt.tmpl
81+ to : CMakeLists.txt
82+
6483 - remove : README.tmpl.md
6584 - remove : Install.cmake.tmpl
6685 - remove : src/pr_module.cpp.tmpl
6786 - remove : .github/pragma_module_info.json.tmpl
68- - remove : CMakeLists.txt.tmpl
87+ - remove : CMakeLists.shared.txt.tmpl
88+ - remove : CMakeLists.server.txt.tmpl
89+ - remove : CMakeLists.client.txt.tmpl
6990 - remove : template_pragma_module.json
7091 - remove : examples/ex_load_pragma_module.tmpl.lua
7192 - remove : .gitignore
0 commit comments