Skip to content

Commit

Permalink
Allow specifying the node version with the NODE_VERSION_URL environme…
Browse files Browse the repository at this point in the history
…nt variable
  • Loading branch information
phw committed Jan 22, 2016
1 parent 989a54c commit 50469aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/util
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

function update_nodejs {
if [ -f "$OPENSHIFT_REPO_DIR/.openshift/NODE_VERSION_URL" ]; then
if [ -n "$NODE_VERSION_URL" ]; then
local VERSION_URL=$NODE_VERSION_URL
elif [ -f "$OPENSHIFT_REPO_DIR/.openshift/NODE_VERSION_URL" ]; then
local VERSION_URL=$(cat $OPENSHIFT_REPO_DIR/.openshift/NODE_VERSION_URL)
else
local VERSION_URL="https://semver.io/node/stable"
Expand Down

0 comments on commit 50469aa

Please sign in to comment.