Skip to content

Commit

Permalink
ensure branch contains valid characters
Browse files Browse the repository at this point in the history
  • Loading branch information
tjenkinson committed Jun 19, 2020
1 parent ac097ec commit 10a7623
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/set-package-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ try {
if (TRAVIS_MODE === 'netlifyPr') {
newVersion += `-pr.${getCommitHash().substr(0, 8)}`;
} else if (TRAVIS_MODE === 'netlifyBranch') {
newVersion += `-branch.${process.env.BRANCH /* set by netlify */}.${getCommitHash().substr(0, 8)}`;
newVersion += `-branch.${process.env.BRANCH/* set by netlify */.replace(/[^a-zA-Z0-9]/g, '-')}.${getCommitHash().substr(0, 8)}`;
} else {
newVersion += `-canary.${getCommitNum()}`;
}
Expand Down

0 comments on commit 10a7623

Please sign in to comment.