File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -57,19 +57,20 @@ jobs:
57
57
58
58
if [[ "$name" == "fdk-aac-free" || "$name" == "redis" ]]; then
59
59
# get the previous spec if it exits.
60
- previous_spec=$(git show ${{ env.base_sha }}:"$spec" 2>/dev/null)
60
+ previous_spec=$(git show ${{ env.base_sha }}:"$spec" 2>/dev/null || true)
61
+ git_exit_code=$?
61
62
#if the spec is a new addition, we want previous version to be empty
62
63
previous_version=""
63
64
64
65
if [[ -n "$previous_spec" ]]; then
65
66
echo "Previous spec exists"
66
- # previous_version=$(rpmspec --parse <(git show ${{ env.base_sha }}:"$spec") | grep -E "^Version:\s*(.*)" | awk '{print $2}')
67
+ previous_version=$(rpmspec --parse <(git show ${{ env.base_sha }}:"$spec") | grep -E "^Version:\s*(.*)" | awk '{print $2}')
67
68
fi
68
69
echo "Previous version: $previous_version"
69
70
if [[ "$version" != "$previous_version" ]]; then
70
71
1>&2 echo "**** ERROR ****"
71
72
1>&2 echo "Spec '$spec' update is not allowed in Azure Linux."
72
- 1>&2 echo "**** ERROR ****"
73
+ 1>&2 echo "**** ERROR 1 ****"
73
74
error_found=1
74
75
fi
75
76
fi
You can’t perform that action at this time.
0 commit comments