Auto-generate rootfs image name
This commit is contained in:
parent
fdb08ecf62
commit
f81a4e38a1
@ -27,6 +27,12 @@ func (km KernelMask) DockerName() string {
|
|||||||
return fmt.Sprintf("out_of_tree_%s_%s", distro, release)
|
return fmt.Sprintf("out_of_tree_%s_%s", distro, release)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (km KernelMask) ImageName() string {
|
||||||
|
distro := strings.ToLower(km.DistroType.String())
|
||||||
|
release := strings.Replace(km.DistroRelease, ".", "", -1)
|
||||||
|
return fmt.Sprintf("%s_%s.img", distro, release)
|
||||||
|
}
|
||||||
|
|
||||||
type ArtifactType int
|
type ArtifactType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -247,7 +247,11 @@ func genInitrdPath(files []os.FileInfo, kname string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func genRootfsImage(km config.KernelMask) string {
|
func genRootfsImage(km config.KernelMask) string {
|
||||||
return "does not implemented yet, you need to set it byself"
|
usr, err := user.Current()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Sprintln(err)
|
||||||
|
}
|
||||||
|
return usr.HomeDir + "/.out-of-tree/images/" + km.ImageName()
|
||||||
}
|
}
|
||||||
|
|
||||||
func genKernels(km config.KernelMask, newkcfg *config.KernelConfig) (
|
func genKernels(km config.KernelMask, newkcfg *config.KernelConfig) (
|
||||||
|
Loading…
Reference in New Issue
Block a user