Skip to content

Commit 8f9866e

Browse files
committed
adding NOTICE file to the pkg
Signed-off-by: nikhil2611 <ngupta@progress.com>
1 parent 5f98a2a commit 8f9866e

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

NOTICE

Whitespace-only changes.

habitat/plan.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ function Invoke-Build {
6767
}
6868

6969
function Invoke-Install {
70+
write-output "*** invoke-install"
71+
$NoticeFile = "$PLAN_CONTEXT\..\..\NOTICE"
72+
73+
if (Test-Path $NoticeFile) {
74+
Write-BuildLine "** Copying NOTICE to package directory"
75+
Copy-Item -Path $NoticeFile -Destination $pkg_prefix -Force
76+
} else {
77+
Write-BuildLine "** Warning: NOTICE not found at $NoticeFile"
78+
}
79+
7080
Write-BuildLine "** Copy built & cached gems to install directory"
7181
Copy-Item -Path "$HAB_CACHE_SRC_PATH/$pkg_dirname/*" -Destination $pkg_prefix -Recurse -Force -Exclude @("gem_make.out", "mkmf.log", "Makefile",
7282
"*/latest", "latest",

habitat/plan.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,23 @@ do_build() {
4949
ruby ./post-bundle-install.rb
5050
}
5151
do_install() {
52+
53+
# Copy NOTICE.TXT to the package directory
54+
if [[ -f "$PLAN_CONTEXT/../NOTICE" ]]; then
55+
build_line "Copying NOTICE to package directory"
56+
cp "$PLAN_CONTEXT/../NOTICE" "$pkg_prefix/"
57+
else
58+
build_line "Warning: NOTICE not found at $PLAN_CONTEXT/../NOTICE"
59+
fi
60+
5261
export GEM_HOME="$pkg_prefix/vendor"
5362

5463
build_line "Setting GEM_PATH=$GEM_HOME"
5564
export GEM_PATH="$GEM_HOME"
5665
gem install chef-cli-*.gem --no-document
5766
set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor"
5867
wrap_ruby_bin
68+
5969
rm -rf $GEM_PATH/cache/
6070
rm -rf $GEM_PATH/bundler
6171
rm -rf $GEM_PATH/doc

0 commit comments

Comments
 (0)