diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index 2fbe183..e5b8a85 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -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 " $pkg_deps=@( @@ -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"