diff --git a/.releaserc.json b/.releaserc.json index 7127023..7cc12b6 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -3,7 +3,7 @@ "plugins": [ ["@semantic-release/commit-analyzer", { "preset": "conventionalcommits" }], "@semantic-release/release-notes-generator", - ["@semantic-release/exec", { "prepareCmd": "yarn electron-builder --mac --win" }], + ["@semantic-release/exec", { "prepareCmd": "scripts/release.sh ${nextRelease.version}" }], [ "@semantic-release/github", { diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..3963140 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +node -e "require('fs').writeFileSync('package.json', JSON.stringify({ ...require('./package.json'), version: '${$1}' }, null, 2));" +yarn electron-builder --mac --win