Skip to content

Commit 8815806

Browse files
committed
Link to latest plugin template commit via Cruft
1 parent 01978c1 commit 8815806

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.cruft.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"template": "https://github.com/getpelican/cookiecutter-pelican-plugin",
3+
"commit": "c3e12ed61d60be88e8cae2488f6edbfab8085ba4",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"plugin_name": "Web Assets",
8+
"repo_name": "webassets",
9+
"package_name": "webassets",
10+
"distribution_name": "pelican-webassets",
11+
"version": "2.1.0",
12+
"description": "Pelican plugin to manage web assets such as CSS and JS files",
13+
"authors": "{name = \"Pelican Dev Team\", email = \"[email protected]\"}",
14+
"keywords": "\"pelican\", \"plugin\", \"webassets\", \"css\", \"js\", \"minimization\", \"compilation\"",
15+
"readme": "README.md",
16+
"contributing": "CONTRIBUTING.md",
17+
"license": "GNU Affero General Public License v3|AGPL-3.0",
18+
"repo_url": "https://github.com/pelican-plugins/webassets",
19+
"dev_status": "5 - Production/Stable",
20+
"tests_exist": true,
21+
"python_version": "~=3.9",
22+
"pelican_version": ">=4.5",
23+
"_template": "https://github.com/getpelican/cookiecutter-pelican-plugin"
24+
}
25+
},
26+
"directory": null
27+
}

tasks.py

+11
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ def precommit(c):
8282
c.run(f"{PRECOMMIT} install")
8383

8484

85+
@task
86+
def update(c, check=False):
87+
"""Apply upstream plugin template changes to this project."""
88+
if check:
89+
logger.info("** Checking for upstream template changes **")
90+
c.run(f"{CRUFT} check", pty=PTY)
91+
else:
92+
logger.info("** Updating project from upstream template **")
93+
c.run(f"{CRUFT} update", pty=PTY)
94+
95+
8596
@task
8697
def setup(c):
8798
"""Set up the development environment."""

0 commit comments

Comments
 (0)