Commit 1bdb2a23 authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

[BUGFIX] Use SGC node also for shell scripts and not only for the gulp passthru commands

parent 893a167f
......@@ -12,6 +12,29 @@ if [ $SGC_VERSION != $INSTALLED_SGC_VERSION ]; then
exit 1;
fi
# the nvm config file will only exist on unix systems
if [ ! $OSTYPE == "msys" ]
then
. ~/.nvm/nvm.sh
fi
# include version config
. ./sgc-core/core/node.sh
if [ ! $OSTYPE == "msys" ]
then
# set node version
nvm use --delete-prefix ${nodeversion}
else
# interestingly, setting the node version here will break on windows. for some reason the node and npm commands
# wont't be available anymore afterwards. tell the user instead.
if [ ! $(node -v) == "v${nodeversion}" ]
then
echo -e "\033[0;31mWrong node version! Please run 'nvm use ${nodeversion}\033[0m";
exit 1;
fi
fi
if [ "$1" == "shortlist" ]; then
taskList="server images css css:sprites css:svg css:abovethefold images:uploaded js:compile js:qa js shortlist releaseExtension lighthouse"
if [ -e sgc-scripts ]
......@@ -30,29 +53,5 @@ elif [ -e "./sgc-core/core/modules/$1.js" ]; then
node ./sgc-core/core/modules/$1.js $@
else
cd sgc-core
# the nvm config file will only exist on unix systems
if [ ! $OSTYPE == "msys" ]
then
. ~/.nvm/nvm.sh
fi
# include version config
. ./core/node.sh
if [ ! $OSTYPE == "msys" ]
then
# set node version
nvm use --delete-prefix ${nodeversion}
else
# interestingly, setting the node version here will break on windows. for some reason the node and npm commands
# wont't be available anymore afterwards. tell the user instead.
if [ ! $(node -v) == "v${nodeversion}" ]
then
echo -e "\033[0;31mWrong node version! Please run 'nvm use ${nodeversion}\033[0m";
exit 1;
fi
fi
node ./node_modules/gulp/bin/gulp.js $@
fi
'use strict';
const settings = require('../gulp/settings');
const config = settings.getConfig();
let extensions = config.extensions.reduce((accumulator, currentValue) => accumulator + ' ' + currentValue);
// intended as an information output
console.log(extensions);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment