Add a script to deploy the plugin with a tmp folder

This commit is contained in:
Amaury 2021-06-26 16:42:04 +02:00
parent 1ac4a21d2d
commit 53a5e56cda
3 changed files with 20 additions and 2 deletions

5
.rsyncignore Normal file
View File

@ -0,0 +1,5 @@
.*
node_modules/
src/
package-lock.json
tsconfig.json

View File

@ -23,11 +23,12 @@
"README.md"
],
"scripts": {
"prepublish": "tsc"
"buildAndDeploy": "npm run build && npm run deploy",
"deploy": "bash ./scripts/deploy.sh",
"build": "tsc"
},
"staticDirs": {},
"translations": {
"fr-FR": "./languages/fr.json"
},
"dependencies": {
"listener-rss-agregator": "0.0.2"

12
scripts/deploy.sh Normal file
View File

@ -0,0 +1,12 @@
tmp_dir=$(mktemp -d)/peertube-plugin-auto-import-ytb/
work_dir=$(pwd)/
# echo $work_dir
mkdir $tmp_dir
# echo "directory created"
rsync --exclude-from=$work_dir.rsyncignore $work_dir $tmp_dir -ar
# echo "rsync --exclude-from=$work_dir.rsyncignore $work_dir $tmp_dir"
# echo "rsync done"
cd ../PeerTube
node ./dist/server/tools/peertube.js plugins install --path $tmp_dir
# echo $tmp_dir