Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ The `bump-gems` task runs `bundle update` on each of your Gemfiles and optionall
Included functions in `compile.env`:

- `bosh_bundle` which runs `bundle install ...` targeted at `${BOSH_INSTALL_TARGET}`
- `bosh_bundle_local` which runs `bosh_bundle --local ...` targeted at `${BOSH_INSTALL_TARGET}`
- `bosh_generate_runtime_env` which generates `${BOSH_INSTALL_TARGET}/bosh/runtime.env`

To use `ruby-*` package for compilation in your packaging script:
Expand Down
2 changes: 1 addition & 1 deletion ci/templates/packages/ruby-test/packaging.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ fi

cp -r ./test-app/. "${BOSH_INSTALL_TARGET}/"

cd ${BOSH_INSTALL_TARGET}
cd "${BOSH_INSTALL_TARGET}"
bosh_bundle_local
bosh_generate_runtime_env
Comment thread
aramprice marked this conversation as resolved.
5 changes: 3 additions & 2 deletions ci/templates/packages/ruby/packaging.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUBY_VERSION=<%= ruby_patch_version %>
RUBYGEMS_VERSION=<%= rubygems_version %>
LIBYAML_VERSION=<%= yaml_version %>

if [ $(uname -s) == "Darwin" ]; then
if [ "$(uname -s)" == "Darwin" ]; then
if brew --prefix openssl; then
brew_prefix_openssl="$(brew --prefix openssl)"
PATH="${brew_prefix_openssl}/bin:$PATH"
Expand Down Expand Up @@ -66,7 +66,8 @@ tar xzf "ruby-${RUBY_VERSION}.tar.gz"
mkdir "${BOSH_INSTALL_TARGET}/bosh"
cp gemrc "${BOSH_INSTALL_TARGET}/bosh/gemrc"

export PACKAGE_NAME="$(basename ${BOSH_INSTALL_TARGET})"
PACKAGE_NAME="$(basename "${BOSH_INSTALL_TARGET}")"
export PACKAGE_NAME
sed "s#\${PACKAGE_NAME}#${PACKAGE_NAME}#" compile-<%= ruby_version %>.env > "${BOSH_INSTALL_TARGET}/bosh/compile.env"
sed "s#\${PACKAGE_NAME}#${PACKAGE_NAME}#" runtime-<%= ruby_version %>.env > "${BOSH_INSTALL_TARGET}/bosh/runtime.env"

Expand Down
2 changes: 1 addition & 1 deletion ci/templates/src/compile.env.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ bosh_bundle_local() {
bosh_generate_runtime_env() {
mkdir -p "${BOSH_INSTALL_TARGET}/bosh"
cat > "${BOSH_INSTALL_TARGET}/bosh/runtime.env" <<EOF
export PATH=${BOSH_INSTALL_TARGET}/bin:\$PATH
export GEM_HOME=${BOSH_INSTALL_TARGET}/gem_home/ruby/<%= ruby_patch_version %>
export PATH=${BOSH_INSTALL_TARGET}/bin:\${GEM_HOME}/bin:\${PATH}
export BUNDLE_GEMFILE=${BOSH_INSTALL_TARGET}/Gemfile
EOF
Comment thread
aramprice marked this conversation as resolved.
}