Skip to content

Commit c078d89

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

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
@@ -65,6 +65,16 @@ function Invoke-Build {
6565
}
6666

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

habitat/plan.sh

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

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

0 commit comments

Comments
 (0)