2024-05-05 14:45:58 -05:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2024-06-24 14:10:47 -05:00
|
|
|
"oizys/internal/oizys"
|
|
|
|
|
2024-05-05 14:45:58 -05:00
|
|
|
"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-05-05 14:45:58 -05:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2024-06-24 14:10:47 -05:00
|
|
|
var cacheName string
|
|
|
|
|
2024-05-05 14:45:58 -05:00
|
|
|
func init() {
|
|
|
|
cacheCmd.Flags().StringVarP(
|
|
|
|
&cacheName,
|
2024-05-05 17:10:01 -05:00
|
|
|
"cache",
|
|
|
|
"c",
|
|
|
|
"daylin",
|
|
|
|
"name of cachix binary cache",
|
2024-05-05 14:45:58 -05:00
|
|
|
)
|
|
|
|
rootCmd.AddCommand(cacheCmd)
|
|
|
|
}
|