Compare commits
2 Commits
d18ac0baa6
...
fc90b3fb71
| Author | SHA1 | Date |
|---|---|---|
|
|
fc90b3fb71 | |
|
|
6aa251e9ec |
1
TODO.md
1
TODO.md
|
|
@ -1,5 +1,4 @@
|
|||
# TODO:
|
||||
|
||||
- add CI
|
||||
- add flake
|
||||
- use bool value for `generate_gitea_project` when the feature is available
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
"email": "",
|
||||
"git_user": "",
|
||||
"project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }}",
|
||||
"gitea_url": "",
|
||||
"gitea_url": "https://git.pains-perdus.fr",
|
||||
"project_url": "{{ cookiecutter.gitea_url }}/{{ cookiecutter.git_user }}/{{ cookiecutter.project_slug }}",
|
||||
"generate_gitea_project": [ true, false ],
|
||||
"configure_ci": [ true, false ],
|
||||
"woodpecker_gitea_user": "ci",
|
||||
"woodpecker_server": "ci.pains-perdus.fr",
|
||||
"woodpecker_server": "https://ci.pains-perdus.fr",
|
||||
"git_origin": "{{ cookiecutter.gitea_url.replace('https://', 'gitea@').replace('http://', 'gitea') }}:{{ cookiecutter.git_user }}/{{ cookiecutter.project_slug }}.git",
|
||||
"version": "0.1.0",
|
||||
"open_source_license": ["AGPL-3.0-only", "GPL-3.0-only", "MIT", "BSD-3-Clause", "ISC", "Apache-2.0", "Proprietary"],
|
||||
|
|
|
|||
|
|
@ -1,4 +1,17 @@
|
|||
import subprocess
|
||||
import os
|
||||
|
||||
REMOVE_PATHS = [
|
||||
{% if cookiecutter.open_source_license == "Proprietary" %} "LICENSE", {% endif %}
|
||||
{% if cookiecutter.configure_ci == "False" %} ".woodpecker.yml", {% endif %}
|
||||
]
|
||||
|
||||
for path in REMOVE_PATHS:
|
||||
if path and os.path.exists(path):
|
||||
if os.path.isdir(path):
|
||||
os.rmdir(path)
|
||||
else:
|
||||
os.unlink(path)
|
||||
|
||||
subprocess.call(["git", "init"])
|
||||
subprocess.call(["git", "checkout", "-b", "main"])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
pipeline:
|
||||
a-test-step:
|
||||
image: debian
|
||||
test:
|
||||
image: python:${PYTHON_VERSION}
|
||||
pull: true
|
||||
environment:
|
||||
- POETRY_VIRTUALENVS_IN_PROJECT=true
|
||||
commands:
|
||||
- echo "Testing.."
|
||||
- pip install poetry
|
||||
- poetry install
|
||||
- poetry run pytest
|
||||
|
||||
matrix:
|
||||
PYTHON_VERSION:
|
||||
- {{ cookiecutter. python_min_version}}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{% set is_open_source = cookiecutter.open_source_license != 'Proprietary' -%}
|
||||
{% set repo = "/".join(cookiecutter.git_origin.removesuffix(".git").split(":")[-1].split("/")[-2:]) %}
|
||||
# {{ cookiecutter.project_name }}
|
||||
{% if cookiecutter.configure_ci %}[](https://ci.pains-perdus.fr/histausse/test_ci_template){% endif %}
|
||||
|
||||
|
||||
{{ cookiecutter.project_short_description }}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue