Skip to content

Commit

Permalink
Fix typo in AppInterface type
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Dewald committed Jan 22, 2024
1 parent d2ab7e5 commit 13bcf91
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions cmd/promote/git/app_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ type Service struct {
} `yaml:"resourceTemplates"`
}

type AppInteface struct {
type AppInterface struct {
GitDirectory string
}

func DefaultAppInterfaceDirectory() string {
return filepath.Join(os.Getenv("HOME"), "git", "app-interface")
}

func BootstrapOsdCtlForAppInterfaceAndServicePromotions(appInterfaceCheckoutDir string) AppInteface {
a := AppInteface{}
func BootstrapOsdCtlForAppInterfaceAndServicePromotions(appInterfaceCheckoutDir string) AppInterface {
a := AppInterface{}
if appInterfaceCheckoutDir != "" {
a.GitDirectory = appInterfaceCheckoutDir
err := checkAppInterfaceCheckout(a.GitDirectory)
Expand Down Expand Up @@ -178,7 +178,7 @@ func GetCurrentPackageTagFromAppInterface(saasFile string) (string, error) {
return currentPackageTag, nil
}

func (a AppInteface) UpdateAppInterface(serviceName, saasFile, currentGitHash, promotionGitHash, branchName string) error {
func (a AppInterface) UpdateAppInterface(serviceName, saasFile, currentGitHash, promotionGitHash, branchName string) error {
cmd := exec.Command("git", "checkout", "master")
cmd.Dir = a.GitDirectory
err := cmd.Run()
Expand Down Expand Up @@ -217,7 +217,7 @@ func (a AppInteface) UpdateAppInterface(serviceName, saasFile, currentGitHash, p
return nil
}

func (a AppInteface) UpdatePackageTag(saasFile, oldTag, promotionTag, branchName string) error {
func (a AppInterface) UpdatePackageTag(saasFile, oldTag, promotionTag, branchName string) error {
cmd := exec.Command("git", "checkout", "master")
cmd.Dir = a.GitDirectory
err := cmd.Run()
Expand Down Expand Up @@ -248,7 +248,7 @@ func (a AppInteface) UpdatePackageTag(saasFile, oldTag, promotionTag, branchName
return nil
}

func (a AppInteface) CommitSaasFile(saasFile, commitMessage string) error {
func (a AppInterface) CommitSaasFile(saasFile, commitMessage string) error {
// Commit the change
cmd := exec.Command("git", "add", saasFile)
cmd.Dir = a.GitDirectory
Expand Down
2 changes: 1 addition & 1 deletion cmd/promote/pko/pko.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (p pkoOptions) ValidatePKOOptions() error {
return nil
}

func PromotePackage(appInterface git.AppInteface, serviceName string, packageTag string, hcp bool) error {
func PromotePackage(appInterface git.AppInterface, serviceName string, packageTag string, hcp bool) error {
services, err := saas.GetServiceNames(appInterface, saas.OSDSaasDir, saas.BPSaasDir, saas.CADSaasDir)
if err != nil {
return err
Expand Down
6 changes: 3 additions & 3 deletions cmd/promote/saas/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
ServicesFilesMap = map[string]string{}
)

func listServiceNames(appInterface git.AppInteface) error {
func listServiceNames(appInterface git.AppInterface) error {
_, err := GetServiceNames(appInterface, OSDSaasDir, BPSaasDir, CADSaasDir)
if err != nil {
return err
Expand All @@ -36,7 +36,7 @@ func listServiceNames(appInterface git.AppInteface) error {
return nil
}

func servicePromotion(appInterface git.AppInteface, serviceName, gitHash string, osd, hcp bool) error {
func servicePromotion(appInterface git.AppInterface, serviceName, gitHash string, osd, hcp bool) error {
_, err := GetServiceNames(appInterface, OSDSaasDir, BPSaasDir, CADSaasDir)
if err != nil {
return err
Expand Down Expand Up @@ -94,7 +94,7 @@ func servicePromotion(appInterface git.AppInteface, serviceName, gitHash string,
return nil
}

func GetServiceNames(appInterface git.AppInteface, saaDirs ...string) ([]string, error) {
func GetServiceNames(appInterface git.AppInterface, saaDirs ...string) ([]string, error) {
baseDir := appInterface.GitDirectory

for _, dir := range saaDirs {
Expand Down

0 comments on commit 13bcf91

Please sign in to comment.