semantic-release / exec

:shell: semantic-release plugin to execute custom shell commands
MIT License
133 stars 25 forks source link

exec lodash template compilation variables #75

Closed thatkookooguy closed 5 years ago

thatkookooguy commented 5 years ago

Trying to access one of the variables shown in the example:

"publishCmd": "./publish.sh ${nextRelease.version} ${options.branch} ${commits.length} ${Date.now()}"

in this project like so:

"success": [
      "@semantic-release/github",
      [
        "@semantic-release/exec",
        {
          "successCmd": "npm start -- --branch ${options.branch}"
        }
      ]
    ],

when this step run, I see this in the travis run:

[11:16:33 PM] [semantic-release] › ℹ  Start step "success" of plugin "@semantic-release/exec"
[11:16:33 PM] [semantic-release] [@semantic-release/exec] › ℹ  Call script npm start -- --branch 
> @kibibit/announce-it@1.1.0-next.10 start /home/travis/build/Kibibit/announce-it
> node ./bin/announce-it-cli.js "--branch"

which looks like the template variable wasn't injected there. I tried looking for a test in the exec.test.js file to look if this is tested (and see if the variable name is wrong in the docs) but couldn't find anything.

Is there a variable I can inject with the branch name? options.branch?

Thanks!

pvdlg commented 5 years ago

Which version of semantic-release do you use?

pvdlg commented 5 years ago

Closing as no answer provided