File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
.github/actions/run-fixtures-test Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -51,22 +51,24 @@ runs:
51
51
working-directory : ${{ inputs.fixtures-dir }}
52
52
env :
53
53
IN_DATE_FORMAT : ${{ inputs.date-format }}
54
+ shell : bash
54
55
run : |
55
56
if [ -f expected.md ]; then
56
57
current_date=$(date +"$IN_DATE_FORMAT")
57
58
sed -i "s/<<DATE>>/$current_date/g" expected.md
58
- if [ ! diff --strip-trailing-cr output.md expected.md ] ; then
59
+ if ! diff --strip-trailing-cr output.md expected.md; then
59
60
echo "The generated changelog does not match the expected changelog."
60
61
exit 1
61
62
fi
62
63
fi
63
- shell : bash
64
64
65
65
- name : Compare the return code with the expected return code
66
66
working-directory : ${{ inputs.fixtures-dir }}
67
+ shell : bash
67
68
run : |
68
- if [ -f expected.rc ] && [ ! diff --skip-trailing-cr output.rc expected.rc ]; then
69
- echo "The return code does not match the expected return code."
70
- exit 1
69
+ if [ -f expected.rc ]; then
70
+ if ! diff --strip-trailing-cr output.rc expected.rc; then
71
+ echo "The return code does not match the expected return code."
72
+ exit 1
73
+ fi
71
74
fi
72
- shell : bash
You can’t perform that action at this time.
0 commit comments