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 using yaml .releaserc.yml and I have to say that the following works
branches:
- main
plugins:
- '@semantic-release/commit-analyzer'
- - '@semantic-release/exec'
- prepareCmd: echo "${nextRelease.version}" > ./version.txt
successCmd: >
if [ ! -f ./version.txt ] ;
then echo "Version file not found" && exit 1;
fi;
if [ ! -f ./XXX.zip ];
then echo "XXX.zip file not found" && exit 1;
fi;
zip -u XXX.zip version.txt;
or with newlines
branches:
- main
plugins:
- '@semantic-release/commit-analyzer'
- - '@semantic-release/exec'
- prepareCmd: echo "${nextRelease.version}" > ./version.txt
successCmd: |
if [ ! -f ./version.txt ]
then echo "Version file not found" && exit 1
fi
if [ ! -f ./XXX.zip ]
then echo "XXX.zip file not found" && exit 1
fi
zip -u XXX.zip version.txt
The above exports during the step prepareCMD, the version into a file called version.txt and then on the step successCMD executes a list of commands on bash. I am using a linux operating system for the semantic versioning build pipeline.
A good for me source is the following https://learnxinyminutes.com/docs/yaml/
Activity
AndyOGo commentedon Jun 9, 2020
It would be really great to support a list of executed commands in series cross platform.
{ "plugins": [ ["@semantic-release/exec", { "publishCmd": [ "cmd 1", "cmd 2", "cmd ..." ] }], ] }MisterBE2 commentedon Aug 31, 2020
I found that this works:
mirkolenz commentedon Dec 18, 2022
My current workaround (if using the file
release.config.js) is to use the join operator on a list of strings like so:While not as elegant as a native support of command lists, it is still quite easy to handle this way.
SpyrosPsarras commentedon Dec 21, 2022
I am using yaml
.releaserc.ymland I have to say that the following worksor with newlines
The above exports during the step prepareCMD, the version into a file called version.txt and then on the step successCMD executes a list of commands on bash. I am using a linux operating system for the semantic versioning build pipeline.
A good for me source is the following https://learnxinyminutes.com/docs/yaml/
coreyar commentedon Jan 17, 2024
The best way to solve this is to use a bash script as mentioned in the README.
MrGadget1024 commentedon Apr 15, 2024
There's a PR about this #360
NoxTav commentedon Aug 30, 2024
I encounter the same issue.
Can I use the plugin several times?
Like this: