diff --git a/ryzom/server/tools/install_rocketchat.sh b/ryzom/server/tools/install_rocketchat.sh index 10cf8d9a2..e8684d90d 100755 --- a/ryzom/server/tools/install_rocketchat.sh +++ b/ryzom/server/tools/install_rocketchat.sh @@ -1,6 +1,21 @@ #!/bin/bash -VERSION="1.0.0-rc.0" - +# ______ _____ _ _ _____ _ +# | ___ \ / ___| | | | |_ _| | | +# | |_/ / _ _______ _ __ ___ \ `--.| |__ __ _ _ __ __| | | | ___ ___ | |___ +# | / | | |_ / _ \| '_ ` _ \ `--. \ '_ \ / _` | '__/ _` | | |/ _ \ / _ \| / __| +# | |\ \ |_| |/ / (_) | | | | | | /\__/ / | | | (_| | | | (_| | | | (_) | (_) | \__ \ +# \_| \_\__, /___\___/|_| |_| |_| \____/|_| |_|\__,_|_| \__,_| \_/\___/ \___/|_|___/ +# __/ | +# |___/ +# +# Ryzom - MMORPG Framework +# Copyright (C) 2019 Winch Gate Property Limited +# This program is free software: read https://ryzom.com/dev/copying.html for more details +# +# Script to build Rocketchat with ryzombridge +# + +VERSION="3.3.3" BUILD_PATH=~/builds echo "INSTALLATION OF VERSION $VERSION !!!!" @@ -8,20 +23,21 @@ echo "INSTALLATION OF VERSION $VERSION !!!!" echo "If you don't have install all requirements check at:" echo "https://rocket.chat/docs/installation/manual-installation/ubuntu/" echo "To install meteor : curl https://install.meteor.com/ | sh" +echo "Ctrl+c to abort..." +read echo "Erasing old..." rm -rf $BUILD_PATH/RocketChat/Rocket.Chat.old mv Rocket.Chat Rocket.Chat.old -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 - cd ~/builds/RocketChat/ if [[ ! -d "megacorp" ]] echo "Missing megacorp. Cloning it.." hg clone ssh://hg@bitbucket.org/ryzom/megacorp fi + cd megacorp hg pull hg update -v @@ -32,29 +48,33 @@ git clone https://github.com/RocketChat/Rocket.Chat.git cd Rocket.Chat git checkout $VERSION -cp $BUILD_PATH/RocketChat/megacorp/ryzom-rocket-bridge/ packages/ -echo -e "\nryzom-rocket-bridge" >> .meteor/packages +cp -r ../megacorp/ryzom-rocket-bridge/ app/ -##cd packages/rocketchat-iframe-login -##sed -i -e $'s/console.log/check(result.token, String);\\\n\\\tconsole.log/g' iframe_server.js -##cd ../.. +echo "import '../app/ryzom-rocket-bridge';" >> client/importPackages.js +echo "import '../app/ryzom-rocket-bridge';" >> server/importPackages.js - -npm install --production -#npm audit fix // ??? +meteor npm install +meteor npm run postinstall rm -rf ../rc-bundle -meteor build ../rc-bundle --architecture os.linux.x86_64 -meteor build ../rc-bundle --architecture os.linux.x86_64 +meteor build --server-only --directory ../rc-bundle +rm -rf ~/scripts/Rocket.Chat +cp -r ../rc-bundle/bundle/ ~/scripts/Rocket.Chat/ +cd ~/scripts/Rocket.Chat/programs/server +npm install + + + +#meteor build ../rc-bundle --architecture os.linux.x86_64 +#meteor build ../rc-bundle --architecture os.linux.x86_64 + +#cd ../rc-bundle +#tar xvfz Rocket.Chat.tar.gz + +#cd ~ +#mv Rocket.Chat/ Rocket.Chat.old +#cp -r src/rc-bundle/bundle/ Rocket.Chat/ -cd ../rc-bundle -tar xvfz Rocket.Chat.tar.gz -cd ~ -mv Rocket.Chat/ Rocket.Chat.old -cp -r src/rc-bundle/bundle/ Rocket.Chat/ -cd ~/Rocket.Chat/programs/server -npm install -tools@chat:~/src$