Skip to content

Commit 0fe5c56

Browse files
committed
Consider only rfc-0000-* files for generate_id
- assign-rfc-number script failed on rfc-draft-cfapiv2-eol.md which contains a digit in the file name
1 parent 8be3f13 commit 0fe5c56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toc/rfc/assign-rfc-number.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NOPUSH=${NOPUSH:-}
2727
#
2828

2929
generate_id() {
30-
id="$(find "$script_dir" -maxdepth 2 -type f -exec basename {} \; | sed 's/[^0-9]*//' | sed -E 's|^([[:digit:]]{4})-.*$|\1|' | sort | tail -n 1 | sed 's/^0*//')"
30+
id="$(find "$script_dir" -maxdepth 2 -type f -exec basename {} \; | grep -E '^rfc-[0-9]{4}-' | sed 's/[^0-9]*//' | sed -E 's|^([[:digit:]]{4})-.*$|\1|' | sort | tail -n 1 | sed 's/^0*//')"
3131
((id++))
3232
printf "%04d" "${id}"
3333
}

0 commit comments

Comments
 (0)