refactor: adr makefile

This commit is contained in:
0xSage 2023-10-18 17:13:59 +08:00
parent 9bf3be1d2e
commit 24d431d985
3 changed files with 40 additions and 5 deletions

View File

@ -1,5 +0,0 @@
newadr:
@echo "Initiating an ADR..."
@read -p "Enter ADR number (e.g. 001): " number; \
read -p "Enter ADR title: " title; \
cp $(CURDIR)/adr/adr-template.md $(CURDIR)/adr/adr-$${number}-$${title}.md

11
adr/Makefile Normal file
View File

@ -0,0 +1,11 @@
newadr:
@echo "Initiating an ADR..."
@last_number=$$(ls $(CURDIR)/adr-[0-9][0-9][0-9]-* | sort -V | tail -n 1 | cut -d '-' -f 2); \
next_number=$$(printf "%03d" $$(( $$last_number + 1 ))); \
read -p "Enter ADR title: " title; \
cp $(CURDIR)/adr-template.md $(CURDIR)/adr-$$next_number-$$title.md
# newadr:
# @echo "Initiating an ADR..."
# @read -p "Enter ADR number (e.g. 001): " number; \
# read -p "Enter ADR title: " title; \
# cp $(CURDIR)/adr-template.md $(CURDIR)/adr-$${number}-$${title}.md

View File

@ -0,0 +1,29 @@
# ADR {ADR-NUM}: {TITLE}
## Changelog
- {date}: {changelog}
## Authors
- @usernames
## Status
What is the status, such as proposed, accepted, rejected, deprecated, superseded, etc.?
{Proposed|Accepted|Rejected}
## Context
What is the issue that we're seeing that is motivating this decision or change?
## Decision
What is the change that we're proposing and/or doing?
## Consequences
What becomes easier or more difficult to do because of this change?
## Alternatives
## Reference