Skip to content

Commit

Permalink
sort | uniq appears to cause issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Gasper committed May 26, 2020
1 parent a461169 commit 1d12382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3-slim

RUN apt update && apt -y upgrade
RUN apt install -y curl jq sort uniq
RUN apt install -y curl jq

RUN pip install black

Expand Down
2 changes: 1 addition & 1 deletion run_black_on_git_diff_adds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo "looking for diff at ${github_pr_url}"
curl --request GET --url ${github_pr_url} --header "authorization: Bearer ${GITHUB_TOKEN}" --header "Accept: application/vnd.github.v3.diff" > github_diff.txt
diff_length=`wc -l github_diff.txt`
echo "approximate diff size: ${diff_length}"
python_files=`cat github_diff.txt | grep -E -- "\+\+\+ |\-\-\- " | awk '{print $2}' | grep -Po -- "(?<=[ab]/).+\.py$ | sort | uniq"`
python_files=`cat github_diff.txt | grep -E -- "\+\+\+ |\-\-\- " | awk '{print $2}' | grep -Po -- "(?<=[ab]/).+\.py$"`
echo "python files edited in this PR: ${python_files}"

if [[ -z "${LINE_LENGTH}" ]]; then
Expand Down

0 comments on commit 1d12382

Please sign in to comment.