File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1717
1818GIT_CLIFF_PATH=" $RUNNER_TEMP /git-cliff/bin/$GIT_CLIFF_BIN "
1919
20+ # On Darwin, BSD stat is the default
21+ # otherwise is GNU stat
22+ if [[ " ${RUNNER_OS} " == " macOS" ]]; then
23+ stat_cmd=(stat -f)
24+ else
25+ stat_cmd=(stat -c)
26+ fi
27+
2028# Set up working directory
21- owner=$( stat -c " %u:%g" .)
29+ owner=$( " ${stat_cmd} " " %u:%g" .)
2230chown -R " $( id -u) " .
2331
2432# Create the output directory
@@ -58,7 +66,7 @@ GIT_CLIFF_OUTPUT="$CONTEXT" "$GIT_CLIFF_PATH" --context "${args[@]}"
5866chown -R " $owner " .
5967
6068# Set the changelog content (max: 50MB)
61- FILESIZE=$( stat -c %s " $OUTPUT " )
69+ FILESIZE=$( " ${stat_cmd} " %s " $OUTPUT " )
6270MAXSIZE=$(( 40 * 1024 * 1024 ))
6371if [ " $FILESIZE " -le " $MAXSIZE " ]; then
6472 echo " content<<EOF" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments