Regular expression in quick install script doesn't work for hugo version 0.100.0 and above. (minor) #5
The validation function in the quick install script:
is checking for the correct version of hugo with an outdated regular expression:
re="v(0\d*\.([5-9][1-9]|[6-9])|[1-9]).*" if ! hugo version | grep -qE "$re"; then echo "Error: After Dark requires Hugo version 0.51 or greater" >&2 exit 1 fi
I did some testing and it should work again with the following:
re="v((0\d*\.((10[0-9]|1[1-9]\d|[2-9]\d\d|1000)|[5-9][1-9]|[6-9])|[1-9])\.).*" if ! hugo version | grep -qE "$re"; then echo "Error: After Dark requires Hugo version 0.51 or greater" >&2 exit 1 fi
This should keep the version necessity for 0.51 or greater, but also includes the 100-1000 range. I tried making a pull request, but that doesn't seem to be permitted.
Thanks for the report. I'm open to pulls to address this. Please ensure any files changed have a copyright line added by the author(s) of the changes in any files with license headers present. Once I've got a block of time to address, I'll keep this need in mind. Sorry I can't be of more help right at this moment. Busy schedule. 🙏
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?