Skip to content

Commit 63329d1

Browse files
committed
fix logic and add license
1 parent f63e919 commit 63329d1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

releasing/check-release-helper.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
#!/usr/bin/env bash
2+
# Copyright 2024 The Kubernetes Authors.
3+
# SPDX-License-Identifier: Apache-2.0
4+
25

36
declare PATCH=false
47
declare MINOR=false
58
declare MAJOR=false
69
declare rc=0
710

8-
git log $(git describe --tags --abbrev=0)..HEAD --oneline | tee /tmp/release-changelogs.txt
11+
ORIGIN_MASTER="origin/master"
12+
LATEST_TAG=$(git describe --tags --abbrev=0)
13+
14+
git log "${LATEST_TAG}..HEAD" --oneline | tee /tmp/release-changelogs.txt
915

1016
count=$(cat /tmp/release-changelogs.txt | wc -l)
1117

@@ -18,7 +24,7 @@ if [[ $(cat /tmp/release-changelogs.txt | grep feat) ]]; then
1824
fi
1925

2026
for f in $(find api); do
21-
git diff --exit-code "${f}"
27+
git diff "${LATEST_TAG}...${ORIGIN_MASTER}" --exit-code -- "${f}"
2228
if [ $? -eq 1 ]; then
2329
echo "Found changes on api dir at ${f}"
2430
MAJOR=true

0 commit comments

Comments
 (0)