devopsdays / devopsdays-web

This is the website for devopsdays

Home Page:https://www.devopsdays.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ensure that add_new_event.sh works on Windows

bridgetkromhout opened this issue · comments

We got a report via @jmgress that https://github.com/devopsdays/devopsdays-web/blob/main/utilities/add_new_event.sh#L39-L47 may have an issue (possibly around the ../static/_redirects bit) on Windows. (My guess is that bit currently makes an assumption about the CWD that may need revisiting.)

The reported error found when making a new tampa event (when there was an existing tampa event) was:

Getting the following error running on Windows (git Bash) sed: can't read /^/tampa/ s/.{4}-tampa/2023-tampa/: No such file or directory

I'm getting the same error on MacOS when I override the built-in FreeBSD sed with GNU sed:

$ ./utilities/add_new_event.sh
Enter your event year (default: 2023):
Enter your city name: Oslo
Enter your devopsdays event twitter handle (defaults to devopsdays): devopsdaysoslo
sed: can't read /^\/oslo/ s/.\{4\}-oslo/2023-oslo/: No such file or directory

When I remove the override and use the FreeBSD sed it works. The two sed utils don't use the same syntax.