Skip to content

Commit

Permalink
feat: add a Makefile task to move 1 draft to post
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanee committed Jan 28, 2024
1 parent 2aafe34 commit 29963f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help serve install draft update leftover
.PHONY: help serve install draft update leftover move_draft

default: serve

Expand All @@ -24,3 +24,8 @@ leftover:
rounded_months=$$(echo $$months_left | awk '{print int($$1+0.99)}'); \
echo "Current drafts: $$current_drafts"; \
echo "Approximately $$rounded_months months left at 1 draft per week."

move_draft:
@file_to_move=$$(ls -1 _drafts | sort | head -n 1); \
mv _drafts/$$file_to_move _posts/; \
echo "Moved file: $$file_to_move"

0 comments on commit 29963f4

Please sign in to comment.