mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-10 04:53:15 -06:00
29 lines
449 B
Go
29 lines
449 B
Go
package cmd
|
|
|
|
import (
|
|
"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) {
|
|
oizys.SetCache(cacheName)
|
|
oizys.CacheBuild(args...)
|
|
},
|
|
}
|
|
|
|
var cacheName string
|
|
|
|
func init() {
|
|
cacheCmd.Flags().StringVarP(
|
|
&cacheName,
|
|
"cache",
|
|
"c",
|
|
"daylin",
|
|
"name of cachix binary cache",
|
|
)
|
|
rootCmd.AddCommand(cacheCmd)
|
|
}
|