pull v1.2.8 fixes when applicable

This commit is contained in:
bunkerity
2021-07-22 14:47:37 +02:00
parent 8bb6676f58
commit a1b9010d9e
4 changed files with 18 additions and 21 deletions

View File

@@ -49,16 +49,11 @@ if __name__ == "__main__" :
variables = utils.load_variables(args.variables)
configurator.load_variables(variables)
config = configurator.get_config()
#print(config)
# Remove old config
# TODO : remove unnecessary files after rendering
# for filename in os.listdir(args.output):
# file_path = os.path.join(args.output, filename)
# if os.path.isfile(file_path) or os.path.islink(file_path):
# os.unlink(file_path)
# elif os.path.isdir(file_path):
# shutil.rmtree(file_path)
# TODO : find a proper way to remove old sites
env_list = glob.glob(args.output + "/**/*.env", recursive=True)
for env in env_list :
os.remove(env)
# Generate the files from templates and config
templator = Templator(config, args.templates, args.output, args.target)