Skip to content

Commit

Permalink
bring back the old terminology
Browse files Browse the repository at this point in the history
Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
M. Fatih Cırıt committed Jun 12, 2024
1 parent 2f90309 commit 7f11795
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions get-modified-packages/get-modified-packages.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Search for packages that have been modified from the base ref.
# Usage: get-modified-packages.sh <base_ref>
# Search for packages that have been modified from the base branch.
# Usage: get-modified-packages.sh <base_branch>

set -e

Expand All @@ -15,11 +15,12 @@ while [ "${1-}" != "" ]; do
shift
done

base_ref="${args[0]}"
# example: base_branch="origin/main"
base_branch="${args[0]}"

# Check args
if [ "$base_ref" = "" ]; then
echo -e "\e[31mPlease input a valid base_ref as the 1st argument.\e[m"
if [ "$base_branch" = "" ]; then
echo -e "\e[31mPlease input a valid base_branch as the 1st argument.\e[m"
exit 1
fi

Expand Down Expand Up @@ -49,8 +50,8 @@ function find_package_dir() {
return 1
}

# Find modified files from base ref
modified_files=$(git diff --name-only "$base_ref"...HEAD)
# Find modified files from base branch
modified_files=$(git diff --name-only "$base_branch"...HEAD)

# Find modified packages
modified_package_dirs=()
Expand Down

0 comments on commit 7f11795

Please sign in to comment.