Skip to content

Commit

Permalink
more cross-platform woes
Browse files Browse the repository at this point in the history
  • Loading branch information
npryce committed Feb 21, 2017
1 parent 2fe20c2 commit 3457d59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 3 additions & 4 deletions tests/migrate-date-format.expected
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
+ adr init
doc/adr/0001-record-architecture-decisions.md
++ ADR_DATE=12/01/1992
++ adr new With Old Date Format
+ adr_file=doc/adr/0002-with-old-date-format.md
+ sed -e 's+^Date: .*$+Date: 12/01/1992+' doc/adr/0002-with-old-date-format.md
+ mv doc/adr/0002-with-old-date-format.md.tmp doc/adr/0002-with-old-date-format.md
+ adr new With Current Date Format
doc/adr/0003-with-current-date-format.md
+ grep 'Date: ' doc/adr/0001-record-architecture-decisions.md doc/adr/0002-with-old-date-format.md doc/adr/0003-with-current-date-format.md
+ grep Date: doc/adr/0001-record-architecture-decisions.md doc/adr/0002-with-old-date-format.md doc/adr/0003-with-current-date-format.md
doc/adr/0001-record-architecture-decisions.md:Date: 1992-01-12
doc/adr/0002-with-old-date-format.md:Date: 12/01/1992
doc/adr/0003-with-current-date-format.md:Date: 1992-01-12
+ adr upgrade-repository
+ grep 'Date: ' doc/adr/0001-record-architecture-decisions.md doc/adr/0002-with-old-date-format.md doc/adr/0003-with-current-date-format.md
+ grep Date: doc/adr/0001-record-architecture-decisions.md doc/adr/0002-with-old-date-format.md doc/adr/0003-with-current-date-format.md
doc/adr/0001-record-architecture-decisions.md:Date: 1992-01-12
doc/adr/0002-with-old-date-format.md:Date: 1992-01-12
doc/adr/0003-with-current-date-format.md:Date: 1992-01-12
8 changes: 3 additions & 5 deletions tests/migrate-date-format.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
adr init
adr_file="`adr new With Old Date Format`"
sed -e 's+^Date: .*$+Date: 12/01/1992+' "$adr_file" > "$adr_file.tmp"
mv "$adr_file.tmp" "$adr_file"
adr_file="$(ADR_DATE=12/01/1992 adr new With Old Date Format)"
adr new With Current Date Format
grep 'Date: ' doc/adr/*
grep Date: doc/adr/*
adr upgrade-repository
grep 'Date: ' doc/adr/*
grep Date: doc/adr/*

0 comments on commit 3457d59

Please sign in to comment.