Skip to content

Commit

Permalink
allow abbreviation point to directory
Browse files Browse the repository at this point in the history
  • Loading branch information
reddec committed Aug 3, 2022
1 parent 52fc31d commit 0261ab9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ func Deploy(ctx context.Context, config Config) error {
fallthrough
case aliasExist: // we found abbreviation template
url = strings.ReplaceAll(repoTemplate, "{0}", repo)
// alias may point to the dir too
if info, err := os.Stat(url); err == nil && info.IsDir() {
projectDir = url
break
}
fallthrough
default: // finally all we need is to pull remote repository by URL
tmpDir, err := cloneFromGit(ctx, config.Git, url)
Expand Down

0 comments on commit 0261ab9

Please sign in to comment.