chore: fix regex bug in migration number fixer (#16822)

This fixes a slight regex bug on Bash 5, where `[:/]` would only match
`:` but not both `:/`.

```bash
$ git remote -v | grep "github.com[:/]coder/coder.*(fetch)" | cut -f1

$ git remote -v | grep "github.com[:/]*coder/coder.*(fetch)" | cut -f1
origin
```

The former will actually cause the whole script to bork because of
`pipefail`, since `grep` exits 1.

Signed-off-by: Danny Kopping <dannykopping@gmail.com>
This commit is contained in:
Danny Kopping
2025-03-06 12:21:14 +02:00
committed by GitHub
parent 0c27f04bc7
commit b16275b7cd
@@ -11,7 +11,7 @@ list_migrations() {
main() {
cd "${SCRIPT_DIR}"
origin=$(git remote -v | grep "github.com[:/]coder/coder.*(fetch)" | cut -f1)
origin=$(git remote -v | grep "github.com[:/]*coder/coder.*(fetch)" | cut -f1)
echo "Fetching ${origin}/main..."
git fetch -u "${origin}" main