Skip to content

Commit

Permalink
change version command
Browse files Browse the repository at this point in the history
Signed-off-by: nitin sanghi <[email protected]>
  • Loading branch information
sanghinitin committed Dec 6, 2024
1 parent 948dcd9 commit 1e68228
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion habitat/tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ package_version=$(awk -F / '{print $3}' <<<"$pkg_ident")
cd "${project_root}"
echo "Testing ${pkg_ident} executables"
version=$(hab pkg exec "${pkg_ident}" chef-cli -v)
actual_version= $(echo $version | sed -E 's/.*version: ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
echo $version
actual_version= $(echo "$version" | sed -E 's/.*version: ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
[[ "$package_version" = "$actual_version" ]] || error "chef-cli version is not the expected version. Expected '$package_version', got '$actual_version'"


5 changes: 5 additions & 0 deletions s.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pkg_ident="sanghinitin/chef-cli/5.6.15/20241205082855"
version=$(hab pkg exec "${pkg_ident}" chef-cli -v)
echo $version
actual_version=$(echo "$version" | sed -E 's/.*version: ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
echo $actual_version

0 comments on commit 1e68228

Please sign in to comment.