Skip to content

Commit

Permalink
fix: release script
Browse files Browse the repository at this point in the history
  • Loading branch information
punxaphil committed Dec 22, 2024
1 parent 8eee0c1 commit 2dd35a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion create-dist-maxi-media-player.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
shopt -s expand_aliases # Use aliases in script

DIR="dist-maxi-media-player"
FILE="maxi-media-player.js"
mkdir -p $DIR
Expand All @@ -7,7 +9,6 @@ mkdir -p $DIR
if [[ "$OSTYPE" == "darwin"* ]]; then
alias sed=gsed
fi

cp dist/custom-sonos-card.js $DIR/$FILE
cd $DIR || exit
sed -i 's/"sonos-card"/"maxi-media-player"/g' $FILE
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"vitest": "^2.1.3"
},
"scripts": {
"build": "npm run lint -- --fix && vite build && sh create-dist-maxi-media-player.sh",
"build": "npm run lint -- --fix && vite build && bash create-dist-maxi-media-player.sh",
"local-deploy": "npm run build && cp dist/custom-sonos-card.js ~/homeassistant/www/community/custom-sonos-card/custom-sonos-card.js",
"lint": "eslint src test",
"test": "vitest",
Expand Down

0 comments on commit 2dd35a9

Please sign in to comment.