Skip to content

Commit 91c05e4

Browse files
committed
Habitat pkg version sync with version file
Signed-off-by: nitin sanghi <nsanghi@progress.com>
1 parent bfcead9 commit 91c05e4

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

habitat/plan.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ $PSDefaultParameterValues['*:ErrorAction']='Stop'
44
$pkg_name="chef-cli"
55
$pkg_origin="chef"
66
$pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION")
7-
$pkg_revision="1"
87
$pkg_maintainer="The Chef Maintainers <humans@chef.io>"
98

109
$pkg_deps=@(
@@ -15,6 +14,13 @@ $pkg_bin_dirs=@("bin"
1514
"vendor/bin")
1615
$project_root= (Resolve-Path "$PLAN_CONTEXT/../").Path
1716

17+
function pkg_version {
18+
Get-Content "$SRC_PATH/VERSION"
19+
}
20+
21+
function Invoke-Before {
22+
Set-PkgVersion
23+
}
1824
function Invoke-SetupEnvironment {
1925
Push-RuntimeEnv -IsPath GEM_PATH "$pkg_prefix/vendor"
2026

habitat/plan.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
pkg_name=chef-cli
22
pkg_origin=chef
3-
pkg_version="5.6.14"
43
ruby_pkg="core/ruby31"
54
pkg_deps=(${ruby_pkg} core/coreutils)
65
pkg_build_deps=(
@@ -17,6 +16,13 @@ do_setup_environment() {
1716
build_line "Setting GEM_PATH=$GEM_HOME"
1817
export GEM_PATH="$GEM_HOME"
1918
}
19+
20+
pkg_version() {
21+
cat "$SRC_PATH/VERSION"
22+
}
23+
do_before() {
24+
update_pkg_version
25+
}
2026
do_unpack() {
2127
mkdir -pv "$HAB_CACHE_SRC_PATH/$pkg_dirname"
2228
cp -RT "$PLAN_CONTEXT"/.. "$HAB_CACHE_SRC_PATH/$pkg_dirname/"

0 commit comments

Comments
 (0)