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 <[email protected]>
  • Loading branch information
Sachin committed Nov 28, 2024
1 parent 78dd2b8 commit 9c96065
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 <[email protected]>"

$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 9c96065

Please sign in to comment.