Skip to content

Commit

Permalink
fix: set correct version output (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
serkonda7 authored Jan 5, 2024
1 parent 5119090 commit 0992002
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions src/setup-bait.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,26 @@ async function run() {
await exec.exec('./bait', ['symlink'])
} else if (process.platform === 'win32') {
await exec.exec('./make.bat')
await exec.exec('./bait.bat', ['symlink', '--ghci-win'])
await core.addPath('./bait')
} else {
core.setFailed('Unsupported platform: ' + process.platform)
}

core.setOutput('bait-path', './bait.bat')
core.setOutput('version', 'x.x.x') // TODO get dynamically
let output = ''
const options = {
listeners: {
stdout: (data) => {
output += data.toString()
}
}
}

process.chdir('..')

// Set version output
await exec.exec('bait', ['version'], options)
core.setOutput('version', output)
output = ''
} catch (error) {
core.setFailed(error.message)
}
Expand Down

0 comments on commit 0992002

Please sign in to comment.