mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
cmd/tsconnect: lint during build step
Ensures that TypeScript checks pass before we deploy. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
parent
d5fb852718
commit
7c3f480767
@ -28,6 +28,11 @@ func runBuild() {
|
||||
log.Fatalf("Cannot setup: %v", err)
|
||||
}
|
||||
|
||||
log.Printf("Linting...\n")
|
||||
if err := runYarn("lint"); err != nil {
|
||||
log.Fatalf("Linting failed: %v", err)
|
||||
}
|
||||
|
||||
if err := cleanDist(); err != nil {
|
||||
log.Fatalf("Cannot clean %s: %v", *distDir, err)
|
||||
}
|
||||
|
@ -104,7 +104,11 @@ func buildWasm(dev bool) error {
|
||||
// installJSDeps installs the JavaScript dependencies specified by package.json
|
||||
func installJSDeps() error {
|
||||
log.Printf("Installing JS deps...\n")
|
||||
cmd := exec.Command(*yarnPath)
|
||||
return runYarn()
|
||||
}
|
||||
|
||||
func runYarn(args ...string) error {
|
||||
cmd := exec.Command(*yarnPath, args...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
return cmd.Run()
|
||||
|
Loading…
Reference in New Issue
Block a user