Skip to content

Commit

Permalink
Merge pull request #6 from bullhorn/feat/(feature-branch-naming)
Browse files Browse the repository at this point in the history
feat: using full branch name in version
  • Loading branch information
jeremy-dobler authored Apr 7, 2022
2 parents 3c03067 + 1990288 commit adc8cd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions bin/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ var chalk = require('chalk'),

module.exports = {
bumpWithBranch: function(version, build, branch) {
var bArray = branch.split('/');
var feature = bArray[bArray.length - 1];

return version + '-' + feature + '.' + build;
var branchNameCharReplaced = branch.replaceAll('/', '-');
return version + '-' + branchNameCharReplaced + '.' + build;
},
bump: function(version, build) {
var vArray = version.split('.');
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dev-build-release",
"version": "0.1.2",
"version": "0.1.3",
"description": "Simple tool to append the build number to the package.json for a development release",
"main": "index.js",
"preferGlobal": true,
Expand Down Expand Up @@ -32,4 +32,4 @@
"git-repo-info": "^2.0.0",
"yargs": "^4.1.0"
}
}
}

0 comments on commit adc8cd9

Please sign in to comment.