Files
Olares/cli/cmd/ctl/os/download.go
Eliott van Nuffel df38148149
Some checks failed
Native Verification / Build Docs (pull_request) Successful in 1m12s
Native Verification / Build App-Service Native (pull_request) Successful in 1m27s
Native Verification / Build Daemon Native (pull_request) Successful in 42s
Lint and Test Charts / lint-test (pull_request_target) Failing after 19s
Lint and Test Charts / test-version (pull_request_target) Successful in 0s
Lint and Test Charts / push-image (pull_request_target) Failing after 15s
Lint and Test Charts / upload-cli (pull_request_target) Failing after 1m15s
Lint and Test Charts / upload-daemon (pull_request_target) Failing after 1m12s
Lint and Test Charts / push-deps (pull_request_target) Has been skipped
Lint and Test Charts / push-deps-arm64 (pull_request_target) Has been skipped
Lint and Test Charts / push-image-arm64 (pull_request_target) Has been cancelled
Lint and Test Charts / upload-package (pull_request_target) Has been cancelled
Lint and Test Charts / install-test (pull_request_target) Has been cancelled
continue beOS rebrand and add native verification
2026-03-10 13:48:45 +01:00

84 lines
2.2 KiB
Go

package os
import (
"log"
"github.com/beclab/beos/cli/cmd/config"
"github.com/beclab/beos/cli/pkg/common"
"github.com/beclab/beos/cli/pkg/pipelines"
"github.com/spf13/cobra"
)
func NewCmdRootDownload() *cobra.Command {
rootDownloadCmd := &cobra.Command{
Use: "download",
Short: "Download the packages and components needed to install beOS Pro",
}
rootDownloadCmd.AddCommand(NewCmdCheckDownload())
rootDownloadCmd.AddCommand(NewCmdDownload())
rootDownloadCmd.AddCommand(NewCmdDownloadWizard())
return rootDownloadCmd
}
func NewCmdDownload() *cobra.Command {
cmd := &cobra.Command{
Use: "component",
Short: "Download the packages and components needed to install beOS Pro",
Run: func(cmd *cobra.Command, args []string) {
if err := pipelines.DownloadInstallationPackage(); err != nil {
log.Fatalf("error: %v", err)
}
},
}
flagSetter := config.NewFlagSetterFor(cmd)
config.AddVersionFlagBy(flagSetter)
config.AddBaseDirFlagBy(flagSetter)
config.AddCDNServiceFlagBy(flagSetter)
config.AddManifestFlagBy(flagSetter)
return cmd
}
func NewCmdDownloadWizard() *cobra.Command {
cmd := &cobra.Command{
Use: "wizard",
Short: "Download the beOS installation wizard",
Run: func(cmd *cobra.Command, args []string) {
if err := pipelines.DownloadInstallationWizard(); err != nil {
log.Fatalf("error: %v", err)
}
},
}
flagSetter := config.NewFlagSetterFor(cmd)
flagSetter.Add(common.FlagReleaseID, "", "", "Set the specific release id of the release version")
flagSetter.Add(common.FlagURLOverride, "", "", "Set another URL for wizard download explicitly")
config.AddVersionFlagBy(flagSetter)
config.AddBaseDirFlagBy(flagSetter)
config.AddCDNServiceFlagBy(flagSetter)
return cmd
}
func NewCmdCheckDownload() *cobra.Command {
cmd := &cobra.Command{
Use: "check",
Short: "Check Downloaded beOS Pro Installation Package",
Run: func(cmd *cobra.Command, args []string) {
if err := pipelines.CheckDownloadInstallationPackage(); err != nil {
log.Fatalf("error: %v", err)
}
},
}
flagSetter := config.NewFlagSetterFor(cmd)
config.AddVersionFlagBy(flagSetter)
config.AddBaseDirFlagBy(flagSetter)
config.AddManifestFlagBy(flagSetter)
return cmd
}