aboutsummaryrefslogtreecommitdiff
path: root/common/travis
diff options
context:
space:
mode:
authorclassabbyamp <void@placeviolette.net>2022-12-16 11:36:15 +0000
committerclassabbyamp <5366828+classabbyamp@users.noreply.github.com>2022-12-21 06:15:15 +0000
commitc1dc168f80ab362fb35ebefe67bb361cfc55650a (patch)
tree3dfff00f53591e3cabd3d3b351f9665b5a4d6df3 /common/travis
parent7249e827a1b0dac77959d0fedc63d7be5851a422 (diff)
downloadvoid-packages-c1dc168f80ab362fb35ebefe67bb361cfc55650a.tar
void-packages-c1dc168f80ab362fb35ebefe67bb361cfc55650a.tar.gz
void-packages-c1dc168f80ab362fb35ebefe67bb361cfc55650a.tar.bz2
void-packages-c1dc168f80ab362fb35ebefe67bb361cfc55650a.tar.lz
void-packages-c1dc168f80ab362fb35ebefe67bb361cfc55650a.tar.xz
void-packages-c1dc168f80ab362fb35ebefe67bb361cfc55650a.tar.zst
void-packages-c1dc168f80ab362fb35ebefe67bb361cfc55650a.zip
common/travis/changed_templates.sh: change branch age check for treeless
small logic change because we now have the complete commit history instead of just `--depth=200`. This preserves the 200 commit limit with a slightly- enhanced error message (wording clarified and it now shows up as an error annotation)
Diffstat (limited to 'common/travis')
-rwxr-xr-xcommon/travis/changed_templates.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 2bed2250ae7..e6a4328e3c4 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -10,9 +10,10 @@ case "$tip" in
*) tip="${tip%% *}" ;;
esac
-base="$(git merge-base FETCH_HEAD "$tip")" || {
- echo "Your branches is based on too old copy."
- echo "Please rebase to newest copy."
+base="$(git merge-base FETCH_HEAD "$tip")"
+
+[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
+ echo "::error title=Branch out of date::Your branch is too out of date. Please rebase on upstream and force-push."
exit 1
}