VueTorrent/precompile-release.sh
2020-09-16 19:20:19 +02:00

28 lines
No EOL
551 B
Bash

#!/bin/bash
build_and_copy(){
npm run build
VERSION=$(jq -r .version package.json)
mkdir ../vuetorrent-release
git clone git@github.com:WDaan/VueTorrent.git ../vuetorrent-release
cd ../vuetorrent-release
git checkout latest-release
sudo rm -r public
cp -r ../vuetorrent/vuetorrent/* ./
}
cleanup(){
cd ..
sudo rm -r vuetorrent-release
}
commit_and_push(){
git add --all
git commit -m "Release v$VERSION"
git push --set-upstream origin latest-release
}
build_and_copy
commit_and_push
cleanup