Skip to content

Commit

Permalink
fix common.sh No such file or directory
Browse files Browse the repository at this point in the history
  • Loading branch information
effoeffi committed Mar 7, 2024
1 parent b9a6a7c commit d9cb594
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 21 deletions.
19 changes: 18 additions & 1 deletion breaking/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
#!/bin/sh
set -e

source $GITHUB_WORKSPACE/common/common.sh
write_output () {
local output="$1"
if [ -n "$output_to_file" ]; then
local file_output="$2"
if [ -z "$file_output" ]; then
file_output=$output
fi
echo "$file_output" >> "$output_to_file"
fi
# github-action limits output to 1MB
# we count bytes because unicode has multibyte characters
size=$(echo "$output" | wc -c)
if [ "$size" -ge "1000000" ]; then
echo "WARN: diff exceeds the 1MB limit, truncating output..." >&2
output=$(echo "$output" | head -c 1000000)
fi
echo "$output" >>"$GITHUB_OUTPUT"
}

readonly base="$1"
readonly revision="$2"
Expand Down
19 changes: 18 additions & 1 deletion changelog/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
#!/bin/sh
set -e

source $GITHUB_WORKSPACE/common/common.sh
write_output () {
local output="$1"
if [ -n "$output_to_file" ]; then
local file_output="$2"
if [ -z "$file_output" ]; then
file_output=$output
fi
echo "$file_output" >> "$output_to_file"
fi
# github-action limits output to 1MB
# we count bytes because unicode has multibyte characters
size=$(echo "$output" | wc -c)
if [ "$size" -ge "1000000" ]; then
echo "WARN: diff exceeds the 1MB limit, truncating output..." >&2
output=$(echo "$output" | head -c 1000000)
fi
echo "$output" >>"$GITHUB_OUTPUT"
}

readonly base="$1"
readonly revision="$2"
Expand Down
18 changes: 0 additions & 18 deletions common/common.sh

This file was deleted.

19 changes: 18 additions & 1 deletion diff/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
#!/bin/sh
set -e

source $GITHUB_WORKSPACE/common/common.sh
write_output () {
local output="$1"
if [ -n "$output_to_file" ]; then
local file_output="$2"
if [ -z "$file_output" ]; then
file_output=$output
fi
echo "$file_output" >> "$output_to_file"
fi
# github-action limits output to 1MB
# we count bytes because unicode has multibyte characters
size=$(echo "$output" | wc -c)
if [ "$size" -ge "1000000" ]; then
echo "WARN: diff exceeds the 1MB limit, truncating output..." >&2
output=$(echo "$output" | head -c 1000000)
fi
echo "$output" >>"$GITHUB_OUTPUT"
}

readonly base="$1"
readonly revision="$2"
Expand Down

0 comments on commit d9cb594

Please sign in to comment.