Skip to content

Commit bc15239

Browse files
authored
Fix-migration-repo-check (#726)
## 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 -->
1 parent d9aa8b6 commit bc15239

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.1.55
1+
VERSION=v0.1.56
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/migrate.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ func runHelmMigrate(ctx context.Context, opts *MigrateOptions) error {
139139
if isSharedConfigInInstallationRepo(user.ActiveAccount.SharedConfigRepo, runtime.Repo) {
140140
destFs = opts.cloneOpts.FS
141141
}
142+
142143
destCloneOpts := &apgit.CloneOptions{
143144
Provider: user.ActiveAccount.GitProvider.String(),
144145
Repo: *user.ActiveAccount.SharedConfigRepo,
@@ -643,8 +644,8 @@ func filterStatus(manifest []byte) []byte {
643644
}
644645

645646
func isSharedConfigInInstallationRepo(iscRepo, installationRepo *string) bool {
646-
iscRepoHost, _, _, _, _, _, _ := aputil.ParseGitUrl(*iscRepo)
647-
installationRepoHost, _, _, _, _, _, _ := aputil.ParseGitUrl(*installationRepo)
647+
iscRepoHost, iscOrgRepo, _, iscBranch, _, _, _ := aputil.ParseGitUrl(*iscRepo)
648+
installationRepoHost, installationOrgRepo, _, installationBranch, _, _, _ := aputil.ParseGitUrl(*installationRepo)
648649

649-
return iscRepoHost == installationRepoHost
650+
return iscRepoHost == installationRepoHost && iscOrgRepo == installationOrgRepo && iscBranch == installationBranch
650651
}

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

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

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

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

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

0 commit comments

Comments
 (0)