Skip to content

Commit 56d33d1

Browse files
committed
fix: add assetes and fix prepareCMD
1 parent edb6a49 commit 56d33d1

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ jobs:
130130
env:
131131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132132
run: |
133+
sudo apt-get install -y jq
133134
chmod +x ./repo-tools/scripts/prepareCMD.sh
134135
semantic-release
135136

.releaserc

+7-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@
165165
[
166166
"@semantic-release/github",
167167
{
168-
"addReleases": "bottom"
168+
"addReleases": "bottom",
169+
"assets": [
170+
{
171+
"path": "./dist/**/*.msi"
172+
}
173+
]
169174
}
170175
],
171176
[
@@ -174,6 +179,7 @@
174179
"assets": [
175180
"GUI/ETVR/package.json",
176181
"GUI/ETVR/src-tauri/tauri.conf.json",
182+
"GUI/ETVR/src-tauri/Cargo.toml",
177183
"LICENSE*",
178184
"CHANGELOG.md"
179185
],

repo-tools/scripts/prepareCMD.sh

+15-3
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,30 @@
33
# create a vairable to hold a passed in argument
44
# this argument is the next release version
55
# this is passed in from the .releaserc file
6+
7+
sudo apt-get install -y jq
8+
69
nextReleaseVersion=$1
10+
TARGET_KEY="version"
11+
12+
printf "Next version: ${nextReleaseVersion}\n"
713

814
# This script is used to execute the prepareCMD.sh script on the remote host
915
printf "Executing prepareCMD.sh on remote host \n"
1016

1117
printf "Update the version in the package.json file \n"
12-
sed -i "s/\"version\": \"[0-9\\.]*\",/\"version\": \"\\$nextReleaseVersion\",/g" ./GUI/ETVR/package.json
18+
19+
# make a temp file
20+
tmp=$(mktemp)
21+
22+
jq --arg a "$nextReleaseVersion" '.version = $a' ./GUI/ETVR/package.json > "$tmp" && mv "$tmp" ./GUI/ETVR/package.json -f
1323

1424
printf "Update the version in the tauri.conf.json file \n"
15-
sed -i "s/\"version\": \"[0-9\\.]*\",/\"version\": \"\\$nextReleaseVersion\",/g" ./GUI/ETVR/src-tauri/tauri.conf.json
25+
26+
jq --arg a "$nextReleaseVersion" '.version = $a' ./GUI/ETVR/src-tauri/tauri.conf.json > "$tmp" && mv "$tmp" ./GUI/ETVR/src-tauri/tauri.conf.json -f
1627

1728
printf "Update the version in the Cargo.toml file \n"
18-
sed -i "s/version = \"[0-9\\.]*\"/version = \"\\$nextReleaseVersion\"/g" ./GUI/ETVR/src-tauri/Cargo.toml
29+
30+
sed -i "s/version = \"[0-9\\.]*\"/version = \"${nextReleaseVersion}\"/g" ./GUI/ETVR/src-tauri/Cargo.toml
1931

2032
printf "[prepareCMD.sh]: Done \n"

0 commit comments

Comments
 (0)