Skip to content

Commit

Permalink
Fix-migration-repo-check (#726)
Browse files Browse the repository at this point in the history
## What
fixed isc <-> installation repo comparison to check orgRepo and branch

## Why
if isc is inside installtion repo - use the same filesystem

## Notes
<!-- Add any additional notes here -->
  • Loading branch information
ATGardner authored Dec 10, 2023
1 parent d9aa8b6 commit bc15239
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=v0.1.55
VERSION=v0.1.56

OUT_DIR=dist
YEAR?=$(shell date +"%Y")
Expand Down
7 changes: 4 additions & 3 deletions cmd/commands/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func runHelmMigrate(ctx context.Context, opts *MigrateOptions) error {
if isSharedConfigInInstallationRepo(user.ActiveAccount.SharedConfigRepo, runtime.Repo) {
destFs = opts.cloneOpts.FS
}

destCloneOpts := &apgit.CloneOptions{
Provider: user.ActiveAccount.GitProvider.String(),
Repo: *user.ActiveAccount.SharedConfigRepo,
Expand Down Expand Up @@ -643,8 +644,8 @@ func filterStatus(manifest []byte) []byte {
}

func isSharedConfigInInstallationRepo(iscRepo, installationRepo *string) bool {
iscRepoHost, _, _, _, _, _, _ := aputil.ParseGitUrl(*iscRepo)
installationRepoHost, _, _, _, _, _, _ := aputil.ParseGitUrl(*installationRepo)
iscRepoHost, iscOrgRepo, _, iscBranch, _, _, _ := aputil.ParseGitUrl(*iscRepo)
installationRepoHost, installationOrgRepo, _, installationBranch, _, _, _ := aputil.ParseGitUrl(*installationRepo)

return iscRepoHost == installationRepoHost
return iscRepoHost == installationRepoHost && iscOrgRepo == installationOrgRepo && iscBranch == installationBranch
}
4 changes: 2 additions & 2 deletions docs/releases/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cf version

```bash
# download and extract the binary
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.55/cf-linux-amd64.tar.gz | tar zx
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.56/cf-linux-amd64.tar.gz | tar zx

# move the binary to your $PATH
mv ./cf-linux-amd64 /usr/local/bin/cf
Expand All @@ -36,7 +36,7 @@ cf version

```bash
# download and extract the binary
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.55/cf-darwin-amd64.tar.gz | tar zx
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.56/cf-darwin-amd64.tar.gz | tar zx

# move the binary to your $PATH
mv ./cf-darwin-amd64 /usr/local/bin/cf
Expand Down

0 comments on commit bc15239

Please sign in to comment.