Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Toolchain
sgc
Commits
1bdb2a23
Commit
1bdb2a23
authored
Feb 16, 2018
by
Stefan Galinski
🎮
Browse files
[BUGFIX] Use SGC node also for shell scripts and not only for the gulp passthru commands
parent
893a167f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
24 deletions
+26
-24
core/cli.sh
core/cli.sh
+23
-24
core/getExtensions.js
core/getExtensions.js
+3
-0
No files found.
core/cli.sh
View file @
1bdb2a23
...
...
@@ -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
"
\0
33[0;31mWrong node version! Please run 'nvm use
${
nodeversion
}
\0
33[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
"
\0
33[0;31mWrong node version! Please run 'nvm use
${
nodeversion
}
\0
33[0m"
;
exit
1
;
fi
fi
node ./node_modules/gulp/bin/gulp.js
$@
fi
core/getExtensions.js
View file @
1bdb2a23
'
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
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment