semantic-release / semantic-release/exec

Simple Script does nothing

Open
#162 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
164
Forks
28
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the releaserc configuration and version.sh to trace how @semantic-release/exec invokes the publish command on Windows. Run the release workflow with this configuration and check whether the script output and version.txt appear. Done means the command executes during publishing and version.txt contains ${nextRelease.version}.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, shell
Domain
cli, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.