Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix common.sh No such file or directory #45

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading