Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F153821
patch-integration-slave-trusty.sh
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Krinkle
Apr 23 2015, 3:47 AM
2015-04-23 03:47:45 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
patch-integration-slave-trusty.sh
View Options
#!/bin/bash -eu
#
# Revision: 2015-04-23
#
# Additional provisioning for integration slaves running Ubuntu Trusty.
# This assumes "role::ci::slave::labs" is already enabled and applied.
#
# Author: Timo Tijhof
#
# This is free and unencumbered software released into the public domain.
err
()
{
echo
"Error:
$1
"
exit
1
}
# Assert: Node version
node_version
=
$(
node --version
)
if
[[
"
$node_version
"
!
=
"v0.10.25"
]]
;
then
err
"Unexpected Node
$node_version
"
fi
# Patch: Upgrade outdated npm that ships with Ubuntu
npm_version
=
$(
npm --version
)
if
[[
"
$npm_version
"
!
=
"2.7.6"
]]
;
then
if
[[
"
$npm_version
"
!
=
"1.3.10"
]]
;
then
err
"Unexpected npm
$npm_version
"
fi
npm_bin
=
$(
which npm
)
if
[[
"
$npm_bin
"
!
=
"/usr/bin/npm"
]]
;
then
err
"Unexpected npm path:
$npm_bin
"
fi
test
-L
"
$npm_bin
"
||
err
"No symlink at
$npm_bin
"
npm_full_bin
=
$(
readlink -f
"
$npm_bin
"
)
test
-f
"
$npm_full_bin
"
||
err
"No file at
$npm_full_bin
"
sudo rm
"
$npm_bin
"
sudo
$npm_full_bin
install -g npm@2.7.6
npm_version
=
$(
npm --version
)
if
[[
"
$npm_version
"
!
=
"2.7.6"
]]
;
then
err
"Failed to upgrade npm"
fi
fi
# Patch: Ensure grunt-cli is installed
if
which grunt
;
then
grunt_version
=
$(
grunt --version
)
else
grunt_version
=
"-"
fi
if
[[
"
$grunt_version
"
!
=
"grunt-cli v0.1.13"
]]
;
then
sudo npm install -g grunt-cli@0.1.13
grunt_version
=
$(
grunt --version
)
if
[[
"
$grunt_version
"
!
=
"grunt-cli v0.1.13"
]]
;
then
err
"Unexpected Grunt
$grunt_version
"
fi
fi
echo
"Done!"
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
149633
Default Alt Text
patch-integration-slave-trusty.sh (1 KB)
Attached To
Mode
P466 patch-integration-slave-trusty.sh
Attached
Detach File
Event Timeline
Log In to Comment