Commit d9cb594 1 parent b9a6a7c commit d9cb594 Copy full SHA for d9cb594
File tree 4 files changed +54
-21
lines changed
4 files changed +54
-21
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
set -e
3
3
4
- source $GITHUB_WORKSPACE /common/common.sh
4
+ write_output () {
5
+ local output=" $1 "
6
+ if [ -n " $output_to_file " ]; then
7
+ local file_output=" $2 "
8
+ if [ -z " $file_output " ]; then
9
+ file_output=$output
10
+ fi
11
+ echo " $file_output " >> " $output_to_file "
12
+ fi
13
+ # github-action limits output to 1MB
14
+ # we count bytes because unicode has multibyte characters
15
+ size=$( echo " $output " | wc -c)
16
+ if [ " $size " -ge " 1000000" ]; then
17
+ echo " WARN: diff exceeds the 1MB limit, truncating output..." >&2
18
+ output=$( echo " $output " | head -c 1000000)
19
+ fi
20
+ echo " $output " >> " $GITHUB_OUTPUT "
21
+ }
5
22
6
23
readonly base=" $1 "
7
24
readonly revision=" $2 "
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
set -e
3
3
4
- source $GITHUB_WORKSPACE /common/common.sh
4
+ write_output () {
5
+ local output=" $1 "
6
+ if [ -n " $output_to_file " ]; then
7
+ local file_output=" $2 "
8
+ if [ -z " $file_output " ]; then
9
+ file_output=$output
10
+ fi
11
+ echo " $file_output " >> " $output_to_file "
12
+ fi
13
+ # github-action limits output to 1MB
14
+ # we count bytes because unicode has multibyte characters
15
+ size=$( echo " $output " | wc -c)
16
+ if [ " $size " -ge " 1000000" ]; then
17
+ echo " WARN: diff exceeds the 1MB limit, truncating output..." >&2
18
+ output=$( echo " $output " | head -c 1000000)
19
+ fi
20
+ echo " $output " >> " $GITHUB_OUTPUT "
21
+ }
5
22
6
23
readonly base=" $1 "
7
24
readonly revision=" $2 "
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
set -e
3
3
4
- source $GITHUB_WORKSPACE /common/common.sh
4
+ write_output () {
5
+ local output=" $1 "
6
+ if [ -n " $output_to_file " ]; then
7
+ local file_output=" $2 "
8
+ if [ -z " $file_output " ]; then
9
+ file_output=$output
10
+ fi
11
+ echo " $file_output " >> " $output_to_file "
12
+ fi
13
+ # github-action limits output to 1MB
14
+ # we count bytes because unicode has multibyte characters
15
+ size=$( echo " $output " | wc -c)
16
+ if [ " $size " -ge " 1000000" ]; then
17
+ echo " WARN: diff exceeds the 1MB limit, truncating output..." >&2
18
+ output=$( echo " $output " | head -c 1000000)
19
+ fi
20
+ echo " $output " >> " $GITHUB_OUTPUT "
21
+ }
5
22
6
23
readonly base=" $1 "
7
24
readonly revision=" $2 "
You can’t perform that action at this time.
0 commit comments