Skip to content
Draft
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
Empty file added NOTICE
Empty file.
10 changes: 10 additions & 0 deletions habitat/plan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ function Invoke-Build {
}

function Invoke-Install {
write-output "*** invoke-install"
$NoticeFile = "$PLAN_CONTEXT\..\..\NOTICE"

if (Test-Path $NoticeFile) {
Write-BuildLine "** Copying NOTICE to package directory"
Copy-Item -Path $NoticeFile -Destination $pkg_prefix -Force
} else {
Write-BuildLine "** Warning: NOTICE not found at $NoticeFile"
}

Write-BuildLine "** Copy built & cached gems to install directory"
Copy-Item -Path "$HAB_CACHE_SRC_PATH/$pkg_dirname/*" -Destination $pkg_prefix -Recurse -Force -Exclude @("gem_make.out", "mkmf.log", "Makefile",
"*/latest", "latest",
Expand Down
9 changes: 9 additions & 0 deletions habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ do_build() {
ruby ./post-bundle-install.rb
}
do_install() {

# Copy NOTICE.TXT to the package directory
if [[ -f "$PLAN_CONTEXT/../NOTICE" ]]; then
build_line "Copying NOTICE to package directory"
cp "$PLAN_CONTEXT/../NOTICE" "$pkg_prefix/"
else
build_line "Warning: NOTICE not found at $PLAN_CONTEXT/../NOTICE"
fi

export GEM_HOME="$pkg_prefix/vendor"

build_line "Setting GEM_PATH=$GEM_HOME"
Expand Down
Loading