Skip to content

Commit

Permalink
fix requires job
Browse files Browse the repository at this point in the history
  • Loading branch information
seaona committed Jul 2, 2024
1 parent 726f86b commit b3f4510
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ develop_master_rc_only: &develop_master_rc_only
- master
- /^Version-v(\d+)[.](\d+)[.](\d+)/

develop_master_rc_excluded: &develop_master_rc_excluded
filters:
branches:
ignore:
- develop
- master
- /^Version-v(\d+)[.](\d+)[.](\d+)$/

aliases:
# Shallow Git Clone
- &shallow-git-clone
Expand Down Expand Up @@ -114,7 +106,6 @@ workflows:
- check-pr-tag
- prep-deps
- get-changed-files-with-git-diff:
<<: *develop_master_rc_excluded
requires:
- prep-deps
- test-deps-audit:
Expand Down Expand Up @@ -506,7 +497,15 @@ jobs:
at: .
- run:
name: Get changed files with git diff
command: npx tsx .circleci/scripts/git-diff-develop.ts
command: |
# Check if the branch is excluded by the filter
if [[ $(git branch --show-current) == *"develop"* || $(git branch --show-current) == *"master"* || $(git branch --show-current) =~ ^Version-v(\d+)\.(\d+)\.(\d+)$ ]]; then
# Branch is excluded, skip actual execution and exit with success code
echo "Branch excluded by filter, skipping get-changed-files."
exit 0
fi
# If not excluded, proceed with the original git-diff command
npx tsx .circleci/scripts/git-diff-develop.ts
- persist_to_workspace:
root: .
paths:
Expand Down

0 comments on commit b3f4510

Please sign in to comment.