Skip to content

Commit

Permalink
fix: don't assume /workspace in go builder (#53)
Browse files Browse the repository at this point in the history
Fixes: #40

Signed-off-by: Lance Ball <[email protected]>
  • Loading branch information
lance authored Nov 26, 2020
1 parent 7ec6d04 commit d642ab5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buildpacks/go/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ layers_dir="$1"

# INJECT INVOCATION SCAFFOLDING (main)
cp -r $bp_dir/faas $build_dir/faas
mkdir -p bin
go build -o bin/faas ./faas
mkdir -p $build_dir/bin
go build -o $build_dir/bin/faas $build_dir/faas

# PLACE COMPILED BINARY IN APP LAYER FOR LAUNCH
app_layer="$layers_dir/app"
Expand All @@ -21,10 +21,10 @@ build = false
cache = false
EOF

cp ./bin/faas "$app_layer/faas"
cp $build_dir/bin/faas "$app_layer/faas"

# REMOVE SOURCE CODE FROM FINAL CONTAINER
rm -rf /workspace/*
rm -rf $build_dir/*

# LAUNCHER
cat > "$layers_dir/launch.toml" << EOF
Expand Down

0 comments on commit d642ab5

Please sign in to comment.