Skip to content

Commit

Permalink
chore: remove prefix references (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
jveldboom authored Feb 14, 2023
1 parent 768da03 commit 3ba83a9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44162,7 +44162,7 @@ module.exports = async () => {
// return a default version if no previous github tags
if (!latestTag) {
const incrementedVersion = semver.inc('0.0.0', core.getInput('default-bump'))
return utils.setVersionOutputs(incrementedVersion, core.getInput('prefix'))
return utils.setVersionOutputs(incrementedVersion)
}

if (!semver.valid(latestTag.name)) {
Expand All @@ -44174,7 +44174,7 @@ module.exports = async () => {
const bump = await utils.getVersionBump(commits, core.getInput('default-bump'))

const incrementedVersion = semver.inc(latestTag.name, bump)
utils.setVersionOutputs(incrementedVersion, core.getInput('prefix'))
utils.setVersionOutputs(incrementedVersion)
}


Expand Down
4 changes: 2 additions & 2 deletions src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = async () => {
// return a default version if no previous github tags
if (!latestTag) {
const incrementedVersion = semver.inc('0.0.0', core.getInput('default-bump'))
return utils.setVersionOutputs(incrementedVersion, core.getInput('prefix'))
return utils.setVersionOutputs(incrementedVersion)
}

if (!semver.valid(latestTag.name)) {
Expand All @@ -31,5 +31,5 @@ module.exports = async () => {
const bump = await utils.getVersionBump(commits, core.getInput('default-bump'))

const incrementedVersion = semver.inc(latestTag.name, bump)
utils.setVersionOutputs(incrementedVersion, core.getInput('prefix'))
utils.setVersionOutputs(incrementedVersion)
}
1 change: 0 additions & 1 deletion src/run.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ describe('index', () => {
process.env.GITHUB_REPOSITORY = 'foo/bar'
process.env['INPUT_GITHUB-TOKEN'] = 'test-token'
process.env['INPUT_DEFAULT-BUMP'] = 'patch'
process.env.INPUT_PREFIX = 'v'
})

afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('utils', () => {

describe('setVersionOutputs()', () => {
it('should set output for all values', () => {
utils.setVersionOutputs('2.3.4', 'v')
utils.setVersionOutputs('2.3.4')
expect(core.setOutput).toHaveBeenNthCalledWith(1, 'version', '2.3.4')
expect(core.setOutput).toHaveBeenNthCalledWith(2, 'version-with-prefix', 'v2.3.4')
expect(core.setOutput).toHaveBeenNthCalledWith(3, 'major', 2)
Expand Down

0 comments on commit 3ba83a9

Please sign in to comment.