File tree Expand file tree Collapse file tree 3 files changed +69
-1
lines changed
Expand file tree Collapse file tree 3 files changed +69
-1
lines changed Original file line number Diff line number Diff line change 4646 esac
4747done
4848
49- template=${ADR_TEMPLATE:- " $adr_template_dir /template.md" }
5049dstdir=$( " $adr_bin_dir /_adr_dir" )
50+ template=" $ADR_TEMPLATE "
51+ if [ -z $template ]
52+ then
53+ template=" $dstdir /templates/template.md"
54+ if [ ! -f " $template " ]
55+ then
56+ template=" $adr_template_dir /template.md"
57+ fi
58+ fi
5159
5260title=" $@ "
5361
Original file line number Diff line number Diff line change 1+ + adr init adrs
2+ adrs/0001-record-architecture-decisions.md
3+ + mkdir -p adrs/templates
4+ + cat
5+ + adr new Aaa Bbb
6+ adrs/0002-aaa-bbb.md
7+ + adr new Ccc Ddd
8+ adrs/0003-ccc-ddd.md
9+ + cat adrs/0002-aaa-bbb.md
10+ # Aaa Bbb
11+
12+ Project specific template!
13+
14+ # Status
15+
16+ Accepted
17+
18+ # Info
19+
20+ ADR Number: 2
21+
22+ Date: 12/01/1992
23+
24+ + cat adrs/0003-ccc-ddd.md
25+ # Ccc Ddd
26+
27+ Project specific template!
28+
29+ # Status
30+
31+ Accepted
32+
33+ # Info
34+
35+ ADR Number: 3
36+
37+ Date: 12/01/1992
38+
Original file line number Diff line number Diff line change 1+ adr init adrs
2+ mkdir -p adrs/templates
3+ cat > adrs/templates/template.md << EOF
4+ # TITLE
5+
6+ Project specific template!
7+
8+ # Status
9+
10+ STATUS
11+
12+ # Info
13+
14+ ADR Number: NUMBER
15+
16+ Date: DATE
17+
18+ EOF
19+ adr new Aaa Bbb
20+ adr new Ccc Ddd
21+ cat adrs/0002-aaa-bbb.md
22+ cat adrs/0003-ccc-ddd.md
You can’t perform that action at this time.
0 commit comments