-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): solve malformed worflow issues
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
- Loading branch information
1 parent
9132679
commit d679271
Showing
3 changed files
with
46 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
base_hash=$(grep FALCO_ENGINE_CHECKSUM "./userspace/engine/falco_engine_version.h" | awk '{print $3}' | sed -e 's/"//g') | ||
base_engine_ver=$(grep FALCO_ENGINE_VERSION "./userspace/engine/falco_engine_version.h" | awk '{print $3}' | sed -e 's/(//g' -e 's/)//g') | ||
|
||
cur_hash=$(echo "19 96d8d3fc828e5c8c16184d66d0e7d5970864249e9b20cd736acaf70dc6431e0f -" | cut -d ' ' -f 2) | ||
cur_engine_ver=$(echo "19 96d8d3fc828e5c8c16184d66d0e7d5970864249e9b20cd736acaf70dc6431e0f -" | cut -d ' ' -f 1) | ||
|
||
echo "baseref checksum: $base_hash" | ||
echo "baseref engine version: $base_engine_ver" | ||
echo "headref checksum: $cur_hash" | ||
echo "headref engine version: $cur_engine_ver" | ||
if [ "$base_hash" != "$cur_hash" ]; then | ||
echo "engine checksum for baseref and headref differ" | ||
if [ "$base_engine_ver" == "$cur_engine_ver" ]; then | ||
echo "engine version must be bumped" | ||
exit 1 | ||
else | ||
echo "engine version for baseref and headref differ too, so no bump is required" | ||
fi | ||
fi |