From 419aca4f58995754d9228fd21027d4257ca1b147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Desu=C3=B3=20N?= Date: Sun, 5 Nov 2023 20:48:22 -0300 Subject: [PATCH] fix: remove license info if None --- {{cookiecutter.project_name}}/CONTRIBUTING.md | 4 ++++ {{cookiecutter.project_name}}/README.md | 4 ++++ {{cookiecutter.project_name}}/docs/index.md | 4 ++++ ...ookiecutter.license != 'None' -%} license.md {%- endif %}} | 0 4 files changed, 12 insertions(+) rename {{cookiecutter.project_name}}/docs/{license.md => {% if cookiecutter.license != 'None' -%} license.md {%- endif %}} (100%) diff --git a/{{cookiecutter.project_name}}/CONTRIBUTING.md b/{{cookiecutter.project_name}}/CONTRIBUTING.md index c076700..e36d2be 100644 --- a/{{cookiecutter.project_name}}/CONTRIBUTING.md +++ b/{{cookiecutter.project_name}}/CONTRIBUTING.md @@ -1,8 +1,10 @@ # Contributor Guide Thank you for your interest in improving this project. +{% if cookiecutter.license != 'None' -%} This project is open-source under the [{{cookiecutter.license.replace("-", " ")}} license] and welcomes contributions in the form of bug reports, feature requests, and pull requests. +{% endif -%} Here is a list of important resources for contributors: @@ -11,7 +13,9 @@ Here is a list of important resources for contributors: - [Issue Tracker] - [Code of Conduct] +{% if cookiecutter.license != 'None' -%} [{{cookiecutter.license.replace("-", " ").lower()}} license]: https://opensource.org/licenses/{{cookiecutter.license}} +{% endif -%} [source code]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}} {% if cookiecutter.publish -%} [documentation]: https://{{cookiecutter.project_name}}.readthedocs.io/ diff --git a/{{cookiecutter.project_name}}/README.md b/{{cookiecutter.project_name}}/README.md index fbad2e5..caa862f 100644 --- a/{{cookiecutter.project_name}}/README.md +++ b/{{cookiecutter.project_name}}/README.md @@ -60,10 +60,12 @@ Please see the [Command-line Reference] for details. Contributions are very welcome. To learn more, see the [Contributor Guide]. +{% if cookiecutter.license != 'None' -%} ## License Distributed under the terms of the [{{cookiecutter.license.replace("-", " ")}} license][license], _{{cookiecutter.friendly_name}}_ is free and open source software. +{% endif -%} ## Issues @@ -81,7 +83,9 @@ This project was generated from [Dinkin Flicka Cookiecutter] template. +{% if cookiecutter.license != 'None' -%} [license]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/blob/main/LICENSE +{% endif -%} [contributor guide]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/blob/main/CONTRIBUTING.md {% if cookiecutter.publish -%} [command-line reference]: https://{{cookiecutter.project_name}}.readthedocs.io/en/latest/usage.html diff --git a/{{cookiecutter.project_name}}/docs/index.md b/{{cookiecutter.project_name}}/docs/index.md index 2bd6ec1..5c0478a 100644 --- a/{{cookiecutter.project_name}}/docs/index.md +++ b/{{cookiecutter.project_name}}/docs/index.md @@ -4,7 +4,9 @@ end-before: --- ``` +{% if cookiecutter.license != 'None' -%} [license]: license +{% endif -%} [contributor guide]: contributing [command-line reference]: usage @@ -18,6 +20,8 @@ usage autoapi/index contributing Code of Conduct +{% if cookiecutter.license != 'None' -%} License +{% endif -%} Changelog ``` \ No newline at end of file diff --git a/{{cookiecutter.project_name}}/docs/license.md b/{{cookiecutter.project_name}}/docs/{% if cookiecutter.license != 'None' -%} license.md {%- endif %} similarity index 100% rename from {{cookiecutter.project_name}}/docs/license.md rename to {{cookiecutter.project_name}}/docs/{% if cookiecutter.license != 'None' -%} license.md {%- endif %}