mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
27 lines
816 B
Bash
Executable file
27 lines
816 B
Bash
Executable file
#!/bin/bash -ex
|
|
# Pull most recent Let's Chat sources.
|
|
|
|
root_dir=$(dirname "$0")/..
|
|
sources_dir=$root_dir/sources
|
|
|
|
rm -rf $sources_dir/lets-chat
|
|
rm -rf $sources_dir/lets-chat-ldap
|
|
|
|
git clone git@github.com:sdelements/lets-chat.git $sources_dir/lets-chat
|
|
git clone git@github.com:sdelements/lets-chat-ldap.git $sources_dir/lets-chat-ldap
|
|
|
|
# Pre-install node modules
|
|
cd $sources_dir/lets-chat
|
|
npm cache clear
|
|
npm install --production
|
|
npm install --production lets-chat-ldap
|
|
|
|
# Stage changes
|
|
# (git forbids to add a `.git` directory in a subdirectory (except when using submodules); remove them)
|
|
cd $root_dir
|
|
rm -rf $sources_dir/lets-chat/.git
|
|
rm -rf $sources_dir/lets-chat-ldap/.git
|
|
git add $sources_dir/*
|
|
git add -f $sources_dir/lets-chat/node_modules/
|
|
|
|
echo "Let's Chat sources pulled. Now commit the changes."
|