diff --git a/.gitignore b/.gitignore index 85f404f..1ce2b59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.swp build/* +.gitconfiglock +.initsubmodulelock diff --git a/Makefile b/Makefile index 9139457..ac4a9c6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,18 @@ .PHONY: build -build: - python3 build.py +build: .initsubmodulelock + @python3 build.py + +init: .initsubmodulelock .gitconfiglock + +.initsubmodulelock: + @git submodule update --init + @touch .initsubmodulelock + +.gitconfiglock: + @echo "[Make config] Setting git configs to prevent wrong pushes" + @git config push.recurseSubmodules check + @git config status.submodulesummary 1 + @echo "[Push annotated tags by default]" + @git config push.followTags true + @touch .gitconfiglock diff --git a/build.py b/build.py index 633957b..44321fe 100644 --- a/build.py +++ b/build.py @@ -10,6 +10,7 @@ def build(build_dir: str): output = input_root / build_dir for file in input_root.rglob('*.pysty'): formatter = PackageFormatter(package_name=file.with_suffix('').name) + print('[PyTeX] Writing file {}'.format(formatter.file_name)) make_default_commands(formatter) formatter.format_package(file, Path('./').resolve() / build_dir / str(file.parent.relative_to(input_root)))