Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
fix(manifest): if "." is used it should have same outputs as node (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Jun 20, 2021
1 parent fc09300 commit d234c63
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,18 @@ async function runManifest (command) {

const releasesCreated = await factory.runCommand('manifest-release', manifestOpts)
if (releasesCreated) {
core.setOutput('release_created', true)
core.setOutput('releases_created', true)
for (const [path, release] of Object.entries(releasesCreated)) {
if (!release) {
continue
}
for (const [key, val] of Object.entries(release)) {
core.setOutput(`${path}--${key}`, val)
if (path === '.') {
core.setOutput(key, val)
} else {
core.setOutput(`${path}--${key}`, val)
}
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions test/release-please.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ describe('release-please-action', () => {
{
upload_url: 'http://example.com',
tag_name: 'v1.0.0'
},
'.': {
upload_url: 'http://example.com',
tag_name: 'v1.0.0'
}
})

Expand All @@ -356,8 +360,11 @@ describe('release-please-action', () => {
sinon.assert.calledOnce(manifestReleasePRStub)
assert.deepStrictEqual(output, {
releases_created: true,
release_created: true,
'path/pkgA--upload_url': 'http://example.com',
'path/pkgA--tag_name': 'v1.0.0',
tag_name: 'v1.0.0',
upload_url: 'http://example.com',
pr: 25
})
})
Expand Down

0 comments on commit d234c63

Please sign in to comment.