Skip to content

Commit

Permalink
fix(scripts): improve compatibility for release
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGolms committed Nov 15, 2022
1 parent b4dffc2 commit 412eb3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/releaserc.version.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ module.exports = {
{
analyzeCommitsCmd: 'echo ${lastRelease.version} > .VERSION',
// HINT: Make sure that the changed files are part of the 'assets' property in @semantic-release/git in the release script
// WORKAROUND: Use of `case` command, because not all shell versions can interpret the `if` statement syntax correctly.
// Maximum system compatibility between Windows, Linux and MacOS, since `sed -i` behaves differently on each type.
verifyReleaseCmd:
"echo ${nextRelease.version} > .VERSION && \
npm version ${nextRelease.version} --no-git-tag-version --allow-same-version && \
if [[ \"$OSTYPE\" == \"darwin\"* ]]; then SEDOPTION=\" \"; fi && \
case $OSTYPE in darwin*) SEDOPTION=\" \";; esac && \
sed -i$SEDOPTION'' -e 's/version:.*/version: ${nextRelease.version}/g' chart/Chart.yaml && \
sed -i$SEDOPTION'' -e 's/appVersion:.*/appVersion: \"${nextRelease.version}\"/g' chart/Chart.yaml && \
sed -i$SEDOPTION'' -e 's/imageTag:.*/imageTag: ${nextRelease.version}/g' chart/values.yaml && \
Expand Down

0 comments on commit 412eb3d

Please sign in to comment.