Page MenuHomePhabricator

patch-integration-slave-trusty.sh

Authored By
Krinkle
Nov 25 2015, 5:13 AM
Size
1 KB
Referenced Files
None
Subscribers
None

patch-integration-slave-trusty.sh

#!/bin/bash -eu
#
# Revision: 2015-11-25
#
# 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.14.12" ]]; then
sudo /usr/bin/npm install -g npm@2.14.12
npm_version=$(npm --version)
if [[ "$npm_version" != "2.14.12" ]]; 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

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3021682
Default Alt Text
patch-integration-slave-trusty.sh (1 KB)

Event Timeline