summaryrefslogtreecommitdiff
path: root/cmd/build.go
blob: 3877721e5a0e739b8ad7f922b7c7b81986b3bff4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package cmd

import (
	"fmt"
	"log"
	"os"

	"github.com/HimanshuSardana/kite/internal/build"
)

func runBuild(args []string) {
	themeName := DefaultTheme

	if len(args) > 2 {
		themeName = args[2]
	}

	opts := build.BuildOptions{
		ThemeName: themeName,
	}

	fmt.Printf("Building with theme: %s\n", themeName)

	if err := build.Build(opts); err != nil {
		log.Fatalf("Build failed: %v", err)
		os.Exit(1)
	}

	fmt.Println("Build completed successfully!")
}