diff --git a/pkg/cfg/defaults.go b/pkg/cfg/defaults.go index f78b94f8..e41e6be0 100644 --- a/pkg/cfg/defaults.go +++ b/pkg/cfg/defaults.go @@ -32,8 +32,8 @@ func (c *Config) setDefaults() { v.SetDefault("output.log.mode", OutputLogConsole) v.SetDefault("output.query", "") - v.SetDefault("vendor.quickstart.dist_file", common.LibDir+"/{aem-sdk,cq-quickstart}-*.{zip,jar}") - v.SetDefault("vendor.quickstart.license_file", common.LibDir+"/license.properties") + v.SetDefault("vendor.quickstart.dist_file", common.QuickstartDistFile) + v.SetDefault("vendor.quickstart.license_file", common.QuickstartLicenseFile) v.SetDefault("vendor.java.home_dir", "") v.SetDefault("vendor.java.version_constraints", ">= 11, < 12") diff --git a/pkg/common/constants.go b/pkg/common/constants.go index 978fe33f..d8a3c378 100644 --- a/pkg/common/constants.go +++ b/pkg/common/constants.go @@ -24,6 +24,10 @@ const ( DefaultDirName = "default" DefaultDir = MainDir + "/" + DefaultDirName DispatcherHomeDir = "dispatcher/home" + + QuickstartDistFile = LibDir + "/{aem-sdk,cq-quickstart}-*.{zip,jar}" + QuickstartLicenseFile = LibDir + "/" + QuickstartLicenseFilename + QuickstartLicenseFilename = "license.properties" ) const ( diff --git a/pkg/local_instance.go b/pkg/local_instance.go index 21ebcec5..27029def 100644 --- a/pkg/local_instance.go +++ b/pkg/local_instance.go @@ -178,7 +178,7 @@ func (li LocalInstance) binCbpExecutable() string { } func (li LocalInstance) LicenseFile() string { - return pathx.Canonical(li.Dir() + "/" + LicenseFilename) + return pathx.Canonical(li.Dir() + "/" + common.QuickstartLicenseFilename) } var ( diff --git a/pkg/local_instance_manager.go b/pkg/local_instance_manager.go index e65ab723..01d39ac8 100644 --- a/pkg/local_instance_manager.go +++ b/pkg/local_instance_manager.go @@ -6,7 +6,6 @@ import ( "github.com/dustin/go-humanize" "github.com/samber/lo" log "github.com/sirupsen/logrus" - "github.com/wttech/aemc/pkg/common" "github.com/wttech/aemc/pkg/common/fmtx" "github.com/wttech/aemc/pkg/common/pathx" "github.com/wttech/aemc/pkg/common/timex" @@ -15,16 +14,6 @@ import ( "time" ) -const ( - UnpackDir = common.VarDir + "/instance" - BackupDir = common.VarDir + "/backup" - OverrideDir = common.DefaultDir + "/" + common.VarDirName + "/instance" - - DistFile = common.LibDir + "/{aem-sdk,cq-quickstart}-*.{zip,jar}" - LicenseFile = common.LibDir + "/" + LicenseFilename - LicenseFilename = "license.properties" -) - type LocalOpts struct { manager *InstanceManager