Skip to content

Commit

Permalink
fix depth subpath bug (#16)
Browse files Browse the repository at this point in the history
* fix multi subpath bug
* moved repo in right map
  • Loading branch information
lzecca78 authored Feb 17, 2020
1 parent d6c16be commit 8c9d635
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ bases:
- name: monitoring
- name: logging
version: master
- name: dr/velero/velero-base
version: feature/deprecate-and-update
- name: dr/velero/velero-aws
version: feature/deprecate-and-update
- name: dr/velero/velero-restic
version: feature/deprecate-and-update

provider:
roles: {}
Expand Down
11 changes: 8 additions & 3 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package cmd
import (
"fmt"
"log"
"path"
"strings"
)

Expand Down Expand Up @@ -235,10 +236,14 @@ func (n *URLSpec) strategy() string {

func (n *URLSpec) getURLfromCompanyRepos() string {
var url string
if len(n.Blocks) == 2 {
url = fmt.Sprintf("%s-%s%s//%s/%s?ref=%s", n.Prefix, n.Blocks[0], n.DotGitParticle, n.Kind, n.Blocks[1], n.Version)
} else if len(n.Blocks) == 1 {
if len(n.Blocks) == 1 {
url = fmt.Sprintf("%s-%s%s//%s?ref=%s", n.Prefix, n.Blocks[0], n.DotGitParticle, n.Kind, n.Version)
} else if len(n.Blocks) >= 2 {
var remainingBlocks string
for i := 1; i < len(n.Blocks); i++ {
remainingBlocks = path.Join(remainingBlocks, n.Blocks[i])
}
url = fmt.Sprintf("%s-%s%s//%s/%s?ref=%s", n.Prefix, n.Blocks[0], n.DotGitParticle, n.Kind, remainingBlocks, n.Version)
}
return url
}

0 comments on commit 8c9d635

Please sign in to comment.