Skip to content

Commit 05f66bc

Browse files
committed
Do not provide github workflow if not on github
1 parent fab3387 commit 05f66bc

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

hooks/post_gen_project.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import shutil
12
import subprocess
3+
from pathlib import Path
4+
5+
if "github.com" not in "{{ cookiecutter.repo_url }}":
6+
shutil.rmtree(Path(".github"))
27

38
subprocess.run(["just", "fmt"], check=False)

{{cookiecutter.__repo_name}}/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ dev = [
2424
"ruff",
2525
]
2626

27-
[project.urls]
27+
{% if cookiecutter.repo_url %}[project.urls]
2828
homepage = "{{cookiecutter.repo_url}}"
29-
repository = "{{cookiecutter.repo_url}}.git"
29+
repository = "{{cookiecutter.repo_url}}"
3030

31-
[project.entry-points."pretalx.plugin"]
31+
{% endif %}[project.entry-points."pretalx.plugin"]
3232
{{cookiecutter.module_name}} = "{{cookiecutter.module_name}}:PretalxPluginMeta"
3333

3434
[build-system]

0 commit comments

Comments
 (0)