mirror of
https://github.com/linuxserver/reverse-proxy-confs.git
synced 2025-07-06 13:01:35 -07:00
Advanced date regex with leap year detection
This commit is contained in:
parent
9da6b70153
commit
9ab75fbe9e
1 changed files with 1 additions and 1 deletions
2
.github/workflows/check_samples.yml
vendored
2
.github/workflows/check_samples.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
|
||||
- name: Check Version Date Line Exists
|
||||
run: |
|
||||
VERSION_LINE_MISSING=$(find . -not -path '*/\.*' -type f -name '*.conf.sample' -exec grep -H -c -P '^## Version \d{4}/\d{2}/\d{2}$' {} \; | grep 0$ | cut -d':' -f1)
|
||||
VERSION_LINE_MISSING=$(find . -not -path '*/\.*' -type f -name '*.conf.sample' -exec grep -H -c -P '^## Version (?:19|20|21)(?:(?:[13579][26]|[02468][048])\/(?:(?:0[1-9]|1[0-2])\/(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])\/(?:30))|(?:(?:0[13578]|1[02])\/31))|(?:[0-9]{2}\/(?:0[1-9]|1[0-2])\/(?:0[1-9]|1[0-9]|2[0-8])|(?:(?!02)(?:0[1-9]|1[0-2])\/(?:29|30))|(?:(?:0[13578]|1[02])\/31)))$' {} \; | grep 0$ | cut -d':' -f1)
|
||||
VERSION_LINE_MISSING_COUNT=$(echo "${VERSION_LINE_MISSING}" | wc -w)
|
||||
if (( VERSION_LINE_MISSING_COUNT > 0 )); then
|
||||
echo "The following files are missing the version date line:"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue