Skip to content

Commit b01e39a

Browse files
Merge develop into master
2 parents ca20f5b + 84eb233 commit b01e39a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1191
-664
lines changed

.bundle/config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
---
2-
BUNDLE_GEMFILE: cf.Gemfile
2+
BUNDLE_GEMFILE: "cf.Gemfile"
3+
BUNDLE_BIN: ".bin"

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export PATH=$PWD/.bin:$PATH

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dependencies/
22
dotnet-core_buildpack-*.zip
33
log/
4+
/.bin/

CHANGELOG

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
v1.0.24 Aug 07, 2017
2+
=====================
3+
4+
* Add support for multi buildpack
5+
(https://www.pivotaltracker.com/story/show/142852043)
6+
7+
* Add node 6.11.2, remove node 6.11.1
8+
(https://www.pivotaltracker.com/story/show/149837609)
9+
110
v1.0.23 Jul 21, 2017
211
=====================
312

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.23
1+
1.0.24

bin/compile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
`dirname $0`/compile.rb "$@" | tee -a staging_task.log
19-
exit_status=${PIPESTATUS[0]}
20-
if [ $exit_status -ne 0 ]; then
21-
exit $exit_status
22-
fi
23-
mkdir -p $1/logs
24-
cp -f staging_task.log $1/logs/staging_task.log
18+
#!/bin/bash
19+
set -euo pipefail
20+
21+
BUILD_DIR=$1
22+
CACHE_DIR=$2
23+
export BUILDPACK_DIR=`dirname $(readlink -f ${BASH_SOURCE%/*})`
24+
export DEPS_DIR="$BUILD_DIR/.cloudfoundry"
25+
mkdir -p "$DEPS_DIR/0"
26+
mkdir -p "$BUILD_DIR/.profile.d"
27+
echo "export DEPS_DIR=\$HOME/.cloudfoundry" > "$BUILD_DIR/.profile.d/0000_set-deps-dir.sh"
28+
29+
$BUILDPACK_DIR/bin/supply "$BUILD_DIR" "$CACHE_DIR" "$DEPS_DIR" 0
30+
$BUILDPACK_DIR/bin/finalize "$BUILD_DIR" "$CACHE_DIR" "$DEPS_DIR" 0

bin/finalize

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
# Encoding: utf-8
3+
# ASP.NET Core Buildpack
4+
# Copyright 2017 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
`dirname $0`/finalize.rb "$@" | tee -a staging_task.log
19+
exit_status=${PIPESTATUS[0]}
20+
if [ $exit_status -ne 0 ]; then
21+
exit $exit_status
22+
fi
23+
mkdir -p $1/logs
24+
cp -f staging_task.log $1/logs/staging_task.log

bin/finalize.rb

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env ruby
2+
# Encoding: utf-8
3+
# ASP.NET Core Buildpack
4+
# Copyright 2014-2016 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
build_dir = ARGV[0]
19+
cache_dir = ARGV[1]
20+
deps_dir = ARGV[2]
21+
deps_idx = ARGV[3]
22+
buildpack_dir = File.join(File.dirname(__FILE__), '..')
23+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
24+
25+
require 'buildpack'
26+
require 'open3'
27+
28+
if deps_dir
29+
stdout, stderr, status = Open3.capture3("#{buildpack_dir}/compile-extensions/bin/build_path_from_supply #{deps_dir}")
30+
31+
if status.exitstatus.nonzero?
32+
puts "build_path_from_supply script failed: #{stdout} \n====\n #{stderr}"
33+
exit 1
34+
end
35+
36+
stdout.split("\n").each do |line|
37+
var, val = line.split('=')
38+
ENV[var] = val
39+
end
40+
end
41+
42+
if AspNetCoreBuildpack.finalize(build_dir, cache_dir, deps_dir, deps_idx)
43+
system("#{buildpack_dir}/compile-extensions/bin/store_buildpack_metadata #{buildpack_dir} #{cache_dir}")
44+
if deps_dir
45+
stdout, stderr, status = Open3.capture3("#{buildpack_dir}/compile-extensions/bin/write_profiled_from_supply #{deps_dir} #{build_dir}")
46+
if status.exitstatus.nonzero?
47+
puts "write_profiled_from_supply failed: #{stdout} \n====\n #{stderr}"
48+
exit 1
49+
end
50+
end
51+
exit 0
52+
else
53+
exit 1
54+
end

bin/release

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717

1818
$stdout.sync = true
1919
$stderr.sync = true
20-
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2120

22-
require 'buildpack'
21+
require 'pathname'
2322

2423
build_dir = ARGV[0]
25-
26-
puts AspNetCoreBuildpack.release(build_dir)
24+
release = Pathname.new(build_dir).join('tmp/dotnet-core-buildpack-release-step.yml')
25+
puts release.read if release.exist?

bin/supply

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
# Encoding: utf-8
3+
# ASP.NET Core Buildpack
4+
# Copyright 2017 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
`dirname $0`/supply.rb "$@" | tee -a staging_task.log
19+
exit_status=${PIPESTATUS[0]}
20+
if [ $exit_status -ne 0 ]; then
21+
exit $exit_status
22+
fi
23+
mkdir -p $1/logs
24+
cp -f staging_task.log $1/logs/staging_task.log

0 commit comments

Comments
 (0)