Skip to content

Commit

Permalink
Simplify documentation for Making your buildpack configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
linghengqian committed Sep 22, 2024
1 parent db64ef4 commit 5329f54
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ if [[ ! -f package.json ]]; then
fi

# ======= ADDED =======
plan=${CNB_BUILD_PLAN_PATH}
version=3.1.3

if [[ -f .node-js-version ]]; then
version=$(cat .node-js-version | tr -d '[:space:]')
version=$(< .node-js-version tr -d '[:space:]')
fi

echo "provides = [{ name = \"node-js\" }]" > "$plan"
echo "requires = [{ name = \"node-js\", metadata = { version = \"$version\" } }]" >> "$plan"
cat > "${CNB_BUILD_PLAN_PATH}" << EOL
provides = [{ name = "node-js" }]
requires = [{ name = "node-js", metadata = { version = "$version" } }]
EOL
# ======= /ADDED =======
```

Expand Down

0 comments on commit 5329f54

Please sign in to comment.