diff --git a/Dockerfile b/Dockerfile index a896796c8..e6484ab95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,6 @@ RUN cd /home/hubot/node_modules/hubot-rocketchat && \ coffee -c /home/hubot/node_modules/hubot-rocketchat/src/*.coffee && \ cd /home/hubot -CMD node -e "console.log(JSON.stringify('$EXTERNAL_SCRIPTS'.split(',')))" > external-scripts.json && \ +CMD node -e "console.log(JSON.stringify('$EXTERNAL_SCRIPTS'.split(',').map(elem => elem.replace(/git\+https?\:\/\/.*\/(.*).git/, '\$1'))))" > external-scripts.json && \ npm install $(node -e "console.log('$EXTERNAL_SCRIPTS'.split(',').join(' '))") && \ bin/hubot -n $BOT_NAME -a rocketchat diff --git a/README.md b/README.md index 1400f0390..17ea61668 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ ROOM_ID_CACHE_SIZE | The maximum number of room IDs to cache. You can increase t DM_ROOM_ID_CACHE_SIZE | The maximum number of Direct Message room IDs to cache. You can increase this if your bot usually sends a large number of Direct Messages. Default value: 100 ROOM_ID_CACHE_MAX_AGE | Room IDs and DM Room IDS are cached for this number of seconds. You can increase this value to improve performance in certain scenarios. Default value: 300 BOT_NAME | ** Name of the bot. This is what it responds to -EXTERNAL_SCRIPTS | ** These are the npm modules it will add to hubot. +EXTERNAL_SCRIPTS | ** These are the npm modules it will add to hubot. Could be git+https or git+http protocol urls (see [here](https://docs.npmjs.com/cli/install) for details) if your script is not on the NPM public registry. HUBOT_LOG_LEVEL | hubot log level, string [debug|info|warning|error], default: info ** - Docker image only.