refactor: route bash app name validation through go

The bash and go validators previously each kept their own copy of the regex, which had to be updated in lockstep. Both bash wrappers now invoke the existing common binary via the same pattern as `verify_app_name`, leaving go as the single source of truth. The legacy `IsValidAppNameOld` rule is also widened to allow underscores again so apps created under the old naming rules can still be looked up through `VerifyAppName`'s either-rule fallback.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-09 13:02:54 -04:00
parent 93f87a0f07
commit dbac12e9f1
4 changed files with 43 additions and 15 deletions

View File

@@ -86,6 +86,12 @@ func main() {
} else {
fmt.Print("false")
}
case "is-valid-app-name":
appName := flag.Arg(1)
err = common.IsValidAppName(appName)
case "is-valid-app-name-old":
appName := flag.Arg(1)
err = common.IsValidAppNameOld(appName)
case "verify-app-name":
appName := flag.Arg(1)
err = common.VerifyAppName(appName)