File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Node.js Cloud Native Buildpack
2+
3+ ## Usage
4+
5+ To package this buildpack for consumption:
6+
7+ ```
8+ $ ./scripts/package.sh
9+ ```
10+
11+ This builds the buildpack's Go source using ` GOOS=linux ` by default. You can supply another value as the first argument to ` package.sh ` .
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ TARGET_OS=${1:- linux}
5+
6+ cd " $( dirname " ${BASH_SOURCE[0]} " ) /.."
7+
8+ echo " Target OS is $TARGET_OS "
9+ echo -n " Creating buildpack directory..."
10+ bp_dir=/tmp/" ${PWD##*/ } " _$( openssl rand -hex 12)
11+ mkdir $bp_dir
12+ echo " done"
13+
14+ echo -n " Copying buildpack.toml..."
15+ cp buildpack.toml $bp_dir /buildpack.toml
16+ echo " done"
17+
18+ # TODO: Update list of built binaries as they are written
19+ for b in detect build; do
20+ echo -n " Building $b ..."
21+ GOOS=$TARGET_OS go build -o $bp_dir /bin/$b ./cmd/$b
22+ echo " done"
23+ done
24+ echo " Buildpack packaged into: $bp_dir "
You can’t perform that action at this time.
0 commit comments