Add plugin cookiecutter
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugin_name": "Complexity"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def validate(name, regex, error_message):
|
||||
if not re.match(regex, name):
|
||||
print(error_message % name)
|
||||
|
||||
# exits with status 1 to indicate failure
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
validate('{{ cookiecutter.plugin_name }}',
|
||||
r'^[a-z-]+$', 'ERROR: %s is not a valid plugin name! Only lowercase letters and hyphens are valid (Examples: my-amazing-plugin, myamazingplugin).')
|
||||
@@ -0,0 +1 @@
|
||||
{{cookiecutter.plugin_name}}
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM python:3.8-slim
|
||||
|
||||
RUN pip install cookiecutter==1.7.0 --index-url https://pypi.python.org/simple
|
||||
|
||||
ENTRYPOINT [ "cookiecutter" ]
|
||||
Reference in New Issue
Block a user