Skip to content

Commit 39ede77

Browse files
committed
[ci] Fix checkout and improve error output for gen_versions_map.sh
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent e505857 commit 39ede77

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎.github/workflows/pre-commit.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
fetch-tags: true
1619

1720
- name: Set up Python
1821
uses: actions/setup-python@v4

‎hack/gen_versions_map.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ resolved_miss_map=$(
3131
3232
# if commit is not HEAD, check if it's valid
3333
if [ "$commit" != "HEAD" ]; then
34-
if [ "$(git show "${commit}:./${chart}/Chart.yaml" 2>/dev/null | awk '$1 == "version:" {print $2}')" != "${version}" ]; then
34+
if [ "$(git show "${commit}:./${chart}/Chart.yaml" | awk '$1 == "version:" {print $2}')" != "${version}" ]; then
3535
echo "Commit $commit for $chart $version is not valid" >&2
3636
exit 1
3737
fi
@@ -44,7 +44,7 @@ resolved_miss_map=$(
4444
# if commit is HEAD, but version is not found in HEAD, check all tags
4545
found_tag=""
4646
for tag in $search_commits; do
47-
if [ "$(git show "${tag}:./${chart}/Chart.yaml" 2>/dev/null | awk '$1 == "version:" {print $2}')" = "${version}" ]; then
47+
if [ "$(git show "${tag}:./${chart}/Chart.yaml" | awk '$1 == "version:" {print $2}')" = "${version}" ]; then
4848
found_tag=$(git rev-parse --short "${tag}")
4949
break
5050
fi

0 commit comments

Comments
 (0)