From 3ffd13f18e422575ad481632b993982600204a9e Mon Sep 17 00:00:00 2001 From: Joey Guerra Date: Sun, 12 Nov 2023 14:13:45 -0600 Subject: [PATCH] chore: improve logging when generating a Hubot --- bin/e2e-test.sh | 14 ++++++-------- src/GenHubot.mjs | 7 +++++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/bin/e2e-test.sh b/bin/e2e-test.sh index dd3b4733e..7f88acb73 100755 --- a/bin/e2e-test.sh +++ b/bin/e2e-test.sh @@ -9,22 +9,20 @@ trap "{ CODE=$?; popd; rm -rf $TEMP_ROOT; exit $CODE; }" EXIT ## https://github.com/hubotio/hubot/blob/main/docs/index.md ## use this hubot version -echo "$ create hubot in $TEMP_ROOT" -echo "$ install Hubot from $HUBOT_FOLDER" +echo "Creating hubot in $TEMP_ROOT" +echo " and installing Hubot from $HUBOT_FOLDER" npm init -y npm i $HUBOT_FOLDER -./node_modules/.bin/hubot --create myhubot -cd myhubot +export HUBOT_INSTALLATION_PATH=$HUBOT_FOLDER +./node_modules/.bin/hubot --create . # npm install /path/to/hubot will create a symlink in npm 5+ (http://blog.npmjs.org/post/161081169345/v500). # As the require calls for app-specific scripts happen inside hubot, we have to # set NODE_PATH to the app’s node_modules path so they can be found echo "$ Update NODE_PATH=$TEMP_ROOT/node_modules so everything can be found correctly." -export NODE_PATH=$TEMP_ROOT/node_modules:$TEMP_ROOT/myhubot/node_modules -export PATH=$PATH:$TEMP_ROOT/node_modules/.bin:$TEMP_ROOT/myhubot/node_modules/.bin -export HUBOT_INSTALLATION_PATH=$HUBOT_FOLDER -echo $HUBOT_INSTALLATION_PATH +export NODE_PATH=$TEMP_ROOT/node_modules +export PATH=$PATH:$TEMP_ROOT/node_modules/.bin ## start, but have to sleep 1 second to wait for hubot to start and the scripts to load expect < { packageJson.scripts = { start: 'hubot' } + packageJson.description = 'A simple helpful robot for your Company' if (options.adapter) { packageJson.scripts.start += ` --adapter ${options.adapter}` }