diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..e69de29b diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index f6a65f37..764f9c96 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -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", diff --git a/habitat/plan.sh b/habitat/plan.sh index 808b4e89..1e18f1a9 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -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"