Add script to download older telegram-mtproto commit

This is needed to get server salt renewal working.
This commit is contained in:
Tulir Asokan
2017-11-20 21:46:59 +02:00
parent 6d3c2fdb83
commit d2e64d12d1
2 changed files with 33 additions and 0 deletions
+3
View File
@@ -22,5 +22,8 @@
"eslint": "4.11.x",
"eslint-config-airbnb-base": "12.1.x",
"eslint-plugin-import": "2.8.x"
},
"scripts": {
"fix-auth-renewal": "./scripts/fix-auth-renewal"
}
}
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
cd node_modules/
echo "=== Removing telegram-mtproto installed by npm ==="
rm -rf telegram-mtproto
echo
echo "=== Cloning telegram-mtproto monorepo ==="
git clone https://github.com/zerobias/telegram-mtproto.git telegram-mtproto-monorepo
cd telegram-mtproto-monorepo
echo
echo "=== Checking out non-broken commit ==="
git checkout 083d8c4cd096502e9c347eb1f4a4191ca939842a
cd packages/telegram-mtproto
echo
echo "=== Installing npm dependencies ==="
npm install
cd ../../..
echo
echo "=== Linking package from monorepo to node_modules ==="
ln -s telegram-mtproto-monorepo/packages/telegram-mtproto
echo
echo "=== All done! Authentication should now be indefinitely persistent ==="