Skip to content

Commit

Permalink
Pick version from Version file instead of Hardcoded
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin <sachin.jain@chef.io>
  • Loading branch information
Sachin committed Dec 4, 2024
1 parent 5c7c5d6 commit 9bf0152
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions habitat/plan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ $PSDefaultParameterValues['*:ErrorAction']='Stop'

$pkg_name="fauxhai"
$pkg_origin="core"
$pkg_version="9.3.16"
$pkg_revision="1"
$pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION")
$pkg_maintainer="The Chef Maintainers <humans@chef.io>"

$pkg_deps=@(
Expand All @@ -15,6 +14,19 @@ $pkg_bin_dirs=@("bin"
"vendor/bin")
$project_root= (Resolve-Path "$PLAN_CONTEXT/../").Path

function pkg_version {
Get-Content "$SRC_PATH/VERSION"
}

function Invoke-Before {
Set-PkgVersion
}

# Invoke-Before hook to set package version early
function Invoke-Before {
Set-PkgVersion
}

function Invoke-SetupEnvironment {
Push-RuntimeEnv -IsPath GEM_PATH "$pkg_prefix/vendor"

Expand Down

0 comments on commit 9bf0152

Please sign in to comment.