Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub
overleaf
Commits
6ef2cae5
Commit
6ef2cae5
authored
Jul 27, 2017
by
Hayden Faulds
Browse files
replace grunt service initialisation with bash script
parent
3f963689
Changes
2
Hide whitespace changes
Inline
Side-by-side
Gruntfile.coffee
View file @
6ef2cae5
...
...
@@ -120,16 +120,10 @@ module.exports = (grunt) ->
installService
:
(
service
,
callback
=
(
error
)
->
)
->
console
.
log
"Installing
#{
service
.
name
}
"
Helpers
.
cloneGitRepo
service
,
(
error
)
->
return
callback
(
error
)
if
error
?
Helpers
.
installNpmModules
service
,
(
error
)
->
return
callback
(
error
)
if
error
?
Helpers
.
rebuildNpmModules
service
,
(
error
)
->
return
callback
(
error
)
if
error
?
Helpers
.
runGruntInstall
service
,
(
error
)
->
return
callback
(
error
)
if
error
?
console
.
log
"Finished installing
#{
service
.
name
}
"
callback
()
if
error
?
callback
(
error
)
else
callback
()
cloneGitRepo
:
(
service
,
callback
=
(
error
)
->
)
->
repo_src
=
service
.
repo
...
...
@@ -153,27 +147,6 @@ module.exports = (grunt) ->
proc
.
on
"close"
,
()
->
callback
()
installNpmModules
:
(
service
,
callback
=
(
error
)
->
)
->
dir
=
service
.
name
proc
=
spawn
"npm"
,
[
"install"
],
stdio
:
"inherit"
,
cwd
:
dir
proc
.
on
"close"
,
()
->
callback
()
# work around for https://github.com/npm/npm/issues/5400
# where binary modules are not built due to bug in npm
rebuildNpmModules
:
(
service
,
callback
=
(
error
)
->
)
->
dir
=
service
.
name
proc
=
spawn
"npm"
,
[
"rebuild"
],
stdio
:
"inherit"
,
cwd
:
dir
proc
.
on
"close"
,
()
->
callback
()
runGruntInstall
:
(
service
,
callback
=
(
error
)
->
)
->
dir
=
service
.
name
proc
=
spawn
"grunt"
,
[
"install"
],
stdio
:
"inherit"
,
cwd
:
dir
proc
.
on
"close"
,
()
->
callback
()
checkMake
:
(
callback
=
(
error
)
->
)
->
grunt
.
log
.
write
"Checking make is installed... "
exec
"make --version"
,
(
error
,
stdout
,
stderr
)
->
...
...
bin/install-services
0 → 100644
View file @
6ef2cae5
#! env bash
grep
'name:'
config/services.js |
\
sed
's/.*name: "\(.*\)",/\1/'
|
\
while
read
service
do
pushd
$service
&&
nvm
install
&&
nvm use
&&
npm
install
popd
done
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