|
1 | | -'git reset HEAD~' is TEMPORARY - work around bug in lint-packages.sh |
2 | | -will discuss with Tomjo2000 and fix upstream later |
| 1 | +Part of this will be rebased after |
| 2 | +https://github.com/termux/termux-packages/pull/27095 |
3 | 3 |
|
4 | 4 | --- a/scripts/lint-packages.sh |
5 | 5 | +++ b/scripts/lint-packages.sh |
6 | | -@@ -124,7 +124,8 @@ check_indentation() { |
| 6 | +@@ -123,9 +123,9 @@ check_indentation() { |
| 7 | + |
7 | 8 | # We'll need the 'origin/master' as a base commit when running the version check. |
8 | 9 | # So try fetching it now if it doesn't exist. |
9 | | -+git reset HEAD~ |
10 | | - if ! base_commit="HEAD~$(git rev-list --count FETCH_HEAD..)"; then |
| 10 | +-if ! base_commit="HEAD~$(git rev-list --count FETCH_HEAD..)"; then |
11 | 11 | - git fetch https://github.com/termux/termux-packages.git |
| 12 | +- base_commit="HEAD~$(git rev-list --count FETCH_HEAD..)" |
| 13 | ++if ! base_commit="HEAD~$(git rev-list --no-merges --count FETCH_HEAD..)"; then |
12 | 14 | + git fetch https://github.com/termux-user-repository/tur.git |
13 | | - base_commit="HEAD~$(git rev-list --count FETCH_HEAD..)" |
| 15 | ++ base_commit="HEAD~$(git rev-list --no-merges --count FETCH_HEAD..)" |
14 | 16 | fi |
15 | 17 |
|
| 18 | + check_version() { |
| 19 | +@@ -155,7 +155,7 @@ check_version() { |
| 20 | + } |
| 21 | + |
| 22 | + # Was the package modified in this branch? |
| 23 | +- git diff --exit-code "${base_commit}" -- "${package_dir}" &> /dev/null && { |
| 24 | ++ git diff --no-merges --exit-code "${base_commit}" -- "${package_dir}" &> /dev/null && { |
| 25 | + printf '%s\n' "PASS - ${version} (not modified in this branch)" |
| 26 | + continue |
| 27 | + } |
0 commit comments