oizys/pkgs/oizys/cmd/cache.go

30 lines
449 B
Go
Raw Normal View History

package cmd
import (
2024-06-24 14:10:47 -05:00
"oizys/internal/oizys"
"github.com/spf13/cobra"
)
var cacheCmd = &cobra.Command{
Use: "cache",
Short: "build and push to cachix",
Run: func(cmd *cobra.Command, args []string) {
2024-06-24 14:10:47 -05:00
oizys.SetCache(cacheName)
2024-05-14 12:23:13 -05:00
oizys.CacheBuild(args...)
},
}
2024-06-24 14:10:47 -05:00
var cacheName string
func init() {
cacheCmd.Flags().StringVarP(
&cacheName,
2024-05-05 17:10:01 -05:00
"cache",
"c",
"daylin",
"name of cachix binary cache",
)
rootCmd.AddCommand(cacheCmd)
}