Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pick version from Version file instead of Hardcoded #34

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading