diff --git a/Makefile b/Makefile index eddbba4..b00774e 100644 --- a/Makefile +++ b/Makefile @@ -9,28 +9,42 @@ help: print-%: @echo '$*=$($*)' +UNAME := $(shell uname) +ifeq ($(UNAME), Linux) +SED = sed -i +endif +ifeq ($(UNAME), Darwin) +SED = sed -i '' -e +endif + + .PHONY: gen-python gen-python: ## regenerate the python template from scratch mkdir -p ../python-template && cd ../python-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes copier copy -w . ../python-template --data-file examples/python.yml + cd ../python-template && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml .PHONY: gen-cpp gen-cpp: ## regenerate the c++ template from scratch - mkdir -p ../cpp-template && cd ../cpp-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes - copier copy -w . ../cpp-template --data-file examples/cpp.yml + mkdir -p ../python-template-cpp && cd ../python-template-cpp && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes + copier copy -w . ../python-template-cpp --data-file examples/cpp.yml + cd ../python-template-cpp && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml .PHONY: gen-js gen-js: ## regenerate the js template from scratch - mkdir -p ../js-template && cd ../js-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes - copier copy -w . ../js-template --data-file examples/js.yml + mkdir -p ../python-template-js && cd ../python-template-js && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes + copier copy -w . ../python-template-js --data-file examples/js.yml + cd ../python-template-js && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml .PHONY: gen-jupyter gen-jupyter: ## regenerate the jupyter template from scratch - mkdir -p ../jupyter-template && cd ../jupyter-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes - copier copy -w . ../jupyter-template --data-file examples/jupyter.yml + mkdir -p ../python-template-jupyter && cd ../python-template-jupyter && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes + copier copy -w . ../python-template-jupyter --data-file examples/jupyter.yml + cd ../python-template-jupyter && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml .PHONY: gen-rust gen-rust: ## regenerate the rust template from scratch - mkdir -p ../rust-template && cd ../rust-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes - copier copy -w . ../rust-template --data-file examples/rust.yml + mkdir -p ../python-template-rust && cd ../python-template-rust && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes + copier copy -w . ../python-template-rust --data-file examples/rust.yml + cd ../python-template-rust && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml diff --git a/examples/cpp.yml b/examples/cpp.yml index 4e04c30..b4b0426 100644 --- a/examples/cpp.yml +++ b/examples/cpp.yml @@ -3,6 +3,6 @@ add_extension: cpp email: 3105306+timkpaine@users.noreply.github.com github: python-project-templates project_description: A C++-Python project template -project_name: cpp template +project_name: python template cpp python_version_primary: '3.11' team: Python Project Template Authors diff --git a/examples/js.yml b/examples/js.yml index c5cf58c..c77e0bd 100644 --- a/examples/js.yml +++ b/examples/js.yml @@ -3,6 +3,6 @@ add_extension: js email: 3105306+timkpaine@users.noreply.github.com github: python-project-templates project_description: A JavaScript-Python project template -project_name: js template +project_name: python template js python_version_primary: '3.11' team: Python Project Template Authors diff --git a/examples/jupyter.yml b/examples/jupyter.yml index 2ab46cb..ec411d8 100644 --- a/examples/jupyter.yml +++ b/examples/jupyter.yml @@ -3,6 +3,6 @@ add_extension: jupyter email: 3105306+timkpaine@users.noreply.github.com github: python-project-templates project_description: A Jupyter-Python project template -project_name: jupyter template +project_name: python template jupyter python_version_primary: '3.11' team: Python Project Template Authors diff --git a/examples/rust.yml b/examples/rust.yml index 2b3866c..605e569 100644 --- a/examples/rust.yml +++ b/examples/rust.yml @@ -3,6 +3,6 @@ add_extension: rust email: 3105306+timkpaine@users.noreply.github.com github: python-project-templates project_description: A Rust-Python project template -project_name: rust template +project_name: python template rust python_version_primary: '3.9' team: Python Project Template Authors