Skip to content

Commit

Permalink
feat(version): support "main" as default branch
Browse files Browse the repository at this point in the history
  • Loading branch information
neikvon committed Sep 16, 2020
1 parent 3e5abb9 commit 0c1bcf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class Version extends BaseClass {
version = {
...found,
dir:
found.short !== 'master'
found.short !== 'master' && found.short !== 'main'
? getPathByVersion(this.baseDir, this.baseName, found.short)
: this.mainPath
}
Expand All @@ -95,7 +95,7 @@ export class Version extends BaseClass {
return version
}

if (!['master'].includes(version.short)) {
if (!['master', 'main'].includes(version.short)) {
this.logItem(`Initializing version '${version.short}'...`)
await this.fs.copy(this.mainPath, version.dir)
await git.checkout(version.long, { cwd: version.dir })
Expand Down

0 comments on commit 0c1bcf6

Please sign in to comment.