Skip to content

Commit

Permalink
fix: set version to package.json before running electron-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Jun 17, 2024
1 parent 2df9835 commit 855a47a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
{
Expand Down
4 changes: 4 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 855a47a

Please sign in to comment.