mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-04-27 11:21:44 +00:00
https://go.dev/doc/modules/major-version This way we can bump the kairos dependency on the provider-kairos repo which otherwise produced the error: ``` ~/workspace/kairos/provider-kairos (main)*$ go get -u github.com/kairos-io/kairos@v2.0.0-alpha3 go: github.com/kairos-io/kairos@v2.0.0-alpha3: invalid version: module contains a go.mod file, so module path must match major version ("github.com/kairos-io/kairos/v2") ``` Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
39 lines
741 B
Go
39 lines
741 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/kairos-io/kairos-sdk/profile"
|
|
"github.com/kairos-io/kairos/v2/internal/common"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
app := &cli.App{
|
|
Name: "profile-build",
|
|
Version: common.VERSION,
|
|
Authors: []*cli.Author{
|
|
{
|
|
Name: "Kairos authors",
|
|
},
|
|
},
|
|
Usage: "Build kairos framework images",
|
|
Description: `
|
|
Uses profile files to build kairos images`,
|
|
UsageText: ``,
|
|
Copyright: "kairos authors",
|
|
ArgsUsage: "flavor profileName profileFile outputDirectory",
|
|
Action: func(c *cli.Context) error {
|
|
return profile.BuildFlavor(c.Args().Get(0), c.Args().Get(1), c.Args().Get(2))
|
|
},
|
|
}
|
|
|
|
err := app.Run(os.Args)
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
os.Exit(1)
|
|
}
|
|
}
|