Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne St-Pierre authored and Etienne St-Pierre committed Dec 20, 2023
1 parent 70608e4 commit 6b6a2ce
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions cli/src/services/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export default class ConfigFetcher {

if (
this.config.version?.branchVersionPrefix &&
this.getCurrentBranchName().startsWith(this.config.version?.branchVersionPrefix)
this.getCurrentBranchName().startsWith(
this.config.version?.branchVersionPrefix
)
) {
this.config.version.tag = this.exctractVersionFromBranch(
this.getCurrentBranchName(),
Expand Down Expand Up @@ -84,13 +86,13 @@ Only your master language should be listed in your files config.`
}

private getCurrentBranchName() {
try {
return execSync('git rev-parse --abbrev-ref HEAD')
.toString('utf8')
.replace(/[\n\r\s]+$/, '');
} catch {
return ""
}
try {
return execSync('git rev-parse --abbrev-ref HEAD')
.toString('utf8')
.replace(/[\n\r\s]+$/, '');
} catch {
return '';
}
}

private extractVersionFromBranch(
Expand Down

0 comments on commit 6b6a2ce

Please sign in to comment.