Files
lnreader-plugins/host.sh
T
Rajarshee Chatterjee 6d50f7a516 chore: Update Workflows
[skip ci]
2024-07-14 18:07:57 +05:30

31 lines
656 B
Bash
Executable File

current=`git rev-parse --abbrev-ref HEAD`
version=`node -e "console.log(require('./package.json').version);"`
dist="plugins/v$version"
exists=`git show-ref refs/heads/$dist`
if [ -n "$exists" ]; then
git branch -D $dist
fi
git checkout --orphan $dist
if [ $? -eq 1 ]; then
# If checkout failed
echo "=========="
echo "Could not checkout branch dist! See the error above and fix it!"
exit 1
fi
git reset
rm -rf .js
npm run clearMultisrc
npm run generate
npx tsc -m node16
npm run json
git add -f public/static .dist .js/src/plugins total.svg
git commit -m "chore: Publish Plugins"
git push -f origin $dist
git checkout -f $current