Last active
August 29, 2024 20:34
-
-
Save wlonkly/16d200bc02a7597379f44c40d800949d to your computer and use it in GitHub Desktop.
using things that aren't make for things that aren't compilation dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# feels like make but without the weirdnesses | |
# look, ma, i'm using spaces! | |
publish: | |
scripts/publish.sh | |
force-publish: | |
scripts/publish.sh -f | |
post title: | |
hugo new "posts/{{title}}/index.md" | |
code "content/posts/{{title}}/index.md" | |
server: | |
scripts/server.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: publish force-publish post server | |
default: | |
$(info Targets:) | |
@grep '^[a-z-]*:' Makefile | grep -v '^default:' | sed 's/:.*$$//' | |
publish: | |
@scripts/publish.sh | |
force-publish: | |
@scripts/publish.sh -f | |
post: | |
ifndef title | |
$(error Usage: `make post title=your-title-here') | |
endif | |
@hugo new posts/$(title)/index.md | |
@code content/posts/$(title)/index.md | |
server: | |
@scripts/server.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- i didn't realize Taskfile was yaml until now. :disappoint: | |
tasks: | |
publish: | |
cmds: | |
- scripts/publish.sh | |
force-publish: | |
cmds: | |
- scripts/publish.sh -f | |
post: | |
cmds: | |
- hugo new "posts/{{.CLI_ARGS}}/index.md" | |
- code "content/posts/{{.CLI_ARGS}}/index.md" | |
server: | |
cmds: | |
- scripts/server.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment