Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 authored Apr 19, 2023
1 parent d6be76f commit 0591269
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@

set -ex

echo "::group::verify-changed-files"

INPUT_SEPARATOR="${INPUT_SEPARATOR//\%/%25}"
INPUT_SEPARATOR="${INPUT_SEPARATOR//\./%2E}"

NEWLINE_SEPARATOR=$'\n'
NEWLINE_SEPARATOR='\n'
URLENCODED_NEWLINE_SEPARATOR='%0A'
INPUT_SEPARATOR="${INPUT_SEPARATOR//$NEWLINE_SEPARATOR/$URLENCODED_NEWLINE_SEPARATOR}"
INPUT_SEPARATOR=$(echo "$INPUT_SEPARATOR" | sed "s/${NEWLINE_SEPARATOR}/${URLENCODED_NEWLINE_SEPARATOR}/g")

CARRIAGE_RETURN=$'\r'
CARRIAGE_RETURN='\r'
URLENCODED_CARRIAGE_RETURN='%0D'
INPUT_SEPARATOR="${INPUT_SEPARATOR//$CARRIAGE_RETURN/$URLENCODED_CARRIAGE_RETURN}"
INPUT_SEPARATOR=$(echo "$INPUT_SEPARATOR" | sed "s/${CARRIAGE_RETURN}/${URLENCODED_CARRIAGE_RETURN}/g")

echo "::group::verify-changed-files"
echo "Separator: $INPUT_SEPARATOR"

if [[ -n "$INPUT_FILES_PATTERN_FILE" ]]; then
TRACKED_FILES=$(git diff --diff-filter=ACMUXTRD --name-only | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
Expand Down

0 comments on commit 0591269

Please sign in to comment.