You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to understand how/where the scripts run. I've got a very simple shell script for testing that I want to run during any step. I've tried several.
Below is my releaserc file as well as the contents of the script. I can see where the output of semantic release shows where it runs but there is never any output from the script. No output from the echo command or version.txt is ever created. Also, notice that I do not have "./" in front of my version.sh because this runs on a windows machine and errors out when it is included. Any tips are appreciated.
releaserc
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
["@semantic-release/exec", {
"publishCmd": "version.sh ${nextRelease.version}"
}],
["@semantic-release/git", {
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
]
}
Shell script
#!/bin/bash
VERSION=$1
echo "This is the version from semantic release"
echo $VERSION >> version.txt
Activity
louis-vinchon commentedon May 10, 2021
Same issue on linux machines, scripts do not seem to work in any way:
debugmode from thesemantic-releasecommand.1in the script are completely ignored and the plugin proceeds as if nothing happened, which is most likely the case.Tested with trivial bash and .js scripts the like of "print AAAAAA in package.json".
Nothing.
mrjeffwagner commentedon Jun 3, 2021
I had to add bash to the script command:
"plugins": [ [ "@semantic-release/exec", { "verifyConditionsCmd": "bash ./test.sh ${nextRelease.version}" } ] ],jamesloosli commentedon Jun 29, 2021
I'm also having this issue. it's causing quite a bit of pain.
dgroh commentedon Jan 27, 2022
Why no feedback on this? it's almost one year since this issue has been opened....I'm also having the same issue here
sag1v commentedon Apr 29, 2023
Did you all try to make the bash script as an executable?
#!/bin/bashat the top of the file.chmod +x myScript.sh