Skip to content

Commit

Permalink
updated the plan file for win
Browse files Browse the repository at this point in the history
Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
  • Loading branch information
nikhil2611 committed Dec 3, 2024
1 parent e4625de commit 957e3c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions habitat/plan.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction']='Stop'

$env:HAB_BLDR_CHANNEL = "LTS-2024"
$pkg_name="cookstyle"
$pkg_origin="chef"
$pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION")
Expand All @@ -21,7 +22,6 @@ function pkg_version {
function Invoke-Before {
Set-PkgVersion
}

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

Expand All @@ -48,7 +48,6 @@ function Invoke-Build {
gem build cookstyle.gemspec
Write-BuildLine " ** Using gem to install"
gem install cookstyle-*.gem --no-document


If ($lastexitcode -ne 0) { Exit $lastexitcode }
} finally {
Expand Down
2 changes: 2 additions & 0 deletions habitat/tests/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Write-Host "--- :fire: Smokish test"
$version=hab pkg exec "${pkg_ident}" cookstyle -v
$actual_version=[Regex]::Match($version,"([0-9]+.[0-9]+.[0-9]+)").Value
$package_version=$PackageIdentifier.split("/",4)[2]

Write-Host "package_version $package_version actual version $actual_version"
if ($package_version -eq $actual_version)
{
Write "cookstyle working fine"
Expand Down

0 comments on commit 957e3c4

Please sign in to comment.