Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 68fece6

Browse files
committedJan 16, 2025·
Use simpler subdir names
1 parent e482d57 commit 68fece6

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed
 

‎.github/workflows/deps.yml

+5-12
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,16 @@ jobs:
3434
TEMP_DIR="$(mktemp -d)"
3535
# GITHUB_BASE_REF is set when the job is triggered by a PR.
3636
TARGET_REF="${GITHUB_BASE_REF:-master}"
37-
# GITHUB_HEAD_REF is set when the job is triggered by a PR.
38-
SOURCE_REF="${GITHUB_HEAD_REF:-source}"
3937
40-
# Replace special characters in the branch names.
41-
BEFORE_DIR_NAME="$(echo "${SOURCE_REF}" | sed 's/[^a-zA-Z0-9._-]/_/g')"
42-
AFTER_DIR_NAME="$(echo "${TARGET_REF}" | sed 's/[^a-zA-Z0-9._-]/_/g')"
43-
44-
45-
mkdir "${TEMP_DIR}/${AFTER_DIR_NAME}"
46-
scripts/gen-deps.sh "${TEMP_DIR}/${AFTER_DIR_NAME}"
38+
mkdir "${TEMP_DIR}/after"
39+
scripts/gen-deps.sh "${TEMP_DIR}/after"
4740
4841
git checkout "origin/${TARGET_REF}"
49-
mkdir "${TEMP_DIR}/${BEFORE_DIR_NAME}"
50-
scripts/gen-deps.sh "${TEMP_DIR}/${BEFORE_DIR_NAME}"
42+
mkdir "${TEMP_DIR}/before"
43+
scripts/gen-deps.sh "${TEMP_DIR}/before"
5144
5245
echo "Comparing dependencies..."
5346
cd "${TEMP_DIR}"
5447
# Run grep in a sub-shell since bash does not support ! in the middle of a pipe
55-
diff -u0 -r "./${BEFORE_DIR_NAME}" "./${AFTER_DIR_NAME}" | bash -c '! grep -v "@@"'
48+
diff -u0 -r "before" "after" | bash -c '! grep -v "@@"'
5649
echo "No changes detected."

0 commit comments

Comments
 (0)
Please sign in to comment.