Skip to content

Commit a1a8a61

Browse files
committed
perf: add diff ref param to build
1 parent cee4878 commit a1a8a61

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/pi_build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ jobs:
3737

3838
- name: Run build
3939
run: |
40-
bash cicd-deployment-scripts/pi/build.sh -p "${{ github.event.pull_request.number }}"
40+
bash cicd-deployment-scripts/pi/build.sh \
41+
-p "${{ github.event.pull_request.number }}" \
42+
-r "${{ github.repository.default_branch }}" \

pi/build.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
set -e
44

55
PR_NUMBER=""
6+
DIFF_REF="dev"
67

7-
while getopts p: flag
8+
while getopts p:r: flag
89
do
910
case "${flag}" in
1011
p) PR_NUMBER=${OPTARG};;
12+
r) DIFF_REF=${OPTARG};;
1113
esac
1214
done
1315

14-
UPDATED_FILES=$(git diff --name-only)
16+
git diff $DIFF_REF --color
17+
UPDATED_FILES=$(git diff $DIFF_REF --name-only)
1518
while IFS= read -r file; do
1619
if [[ $file != requirements/* ]] || [[ $file != *.in ]]; then
1720
continue

0 commit comments

Comments
 (0)