From 1993c02b3a04744500094fc4fcec6ef030247888 Mon Sep 17 00:00:00 2001 From: Jacob Shandling <61553566+jacobshandling@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:38:03 -0700 Subject: [PATCH] Move code for `--local-wix-dir` into `ee` directory (#14104) --- cmd/fleetctl/package.go | 8 ++------ ee/fleetctl/local_wix.go | 11 +++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 ee/fleetctl/local_wix.go diff --git a/cmd/fleetctl/package.go b/cmd/fleetctl/package.go index 554727342..57feda389 100644 --- a/cmd/fleetctl/package.go +++ b/cmd/fleetctl/package.go @@ -11,6 +11,7 @@ import ( "strings" "time" + eefleetctl "github.com/fleetdm/fleet/v4/ee/fleetctl" "github.com/fleetdm/fleet/v4/orbit/pkg/packaging" "github.com/rs/zerolog" zlog "github.com/rs/zerolog/log" @@ -182,12 +183,7 @@ func packageCommand() *cli.Command { EnvVars: []string{"FLEETCTL_NATIVE_TOOLING"}, Destination: &opt.NativeTooling, }, - &cli.StringFlag{ - Name: "local-wix-dir", - Usage: "Use local install of WiX instead of Docker Hub (only available on Windows w/ WiX v3)", - EnvVars: []string{"FLEETCTL_LOCAL_WIX_DIR"}, - Destination: &opt.LocalWixDir, - }, + eefleetctl.LocalWixDirFlag(&opt.LocalWixDir), &cli.StringFlag{ Name: "macos-devid-pem-content", Usage: "Dev ID certificate keypair content in PEM format", diff --git a/ee/fleetctl/local_wix.go b/ee/fleetctl/local_wix.go new file mode 100644 index 000000000..1d1564fb8 --- /dev/null +++ b/ee/fleetctl/local_wix.go @@ -0,0 +1,11 @@ +package eefleetctl + +import "github.com/urfave/cli/v2" + +func LocalWixDirFlag(dest *string) *cli.StringFlag { + return &cli.StringFlag{ + Name: "local-wix-dir", + Usage: "Use local install of WiX instead of Docker Hub (only available on Windows w/ WiX v3). This functionality is licensed under the Fleet EE License. Usage requires a current Fleet EE subscription.", + Destination: dest, + } +}