Skip to content

Instantly share code, notes, and snippets.

@wlonkly
Last active August 29, 2024 20:34
Show Gist options
  • Save wlonkly/16d200bc02a7597379f44c40d800949d to your computer and use it in GitHub Desktop.
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
# 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
.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
-- 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