From fa0c61d1e2b6f451fe61547a3523823602f730eb Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 10 Jun 2020 15:36:52 +0200 Subject: [PATCH 1/6] XEP-0329: Fix example 7, remove superfluous 'node' attribute The result IQ's child element does not need to carry the node information. And in this case the node information was actually wrong, since "documents/test2.txt" was queried, and not "test2.txt". --- xep-0329.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xep-0329.xml b/xep-0329.xml index a97bdf3e..fa230c55 100644 --- a/xep-0329.xml +++ b/xep-0329.xml @@ -153,7 +153,7 @@ from='romeo@montague.net/home' to='juliet@capulet.com/chamber' id='1236'> - + test2.txt 1000 From 51aa7ed69101a10c1cc98bc647ba262771cea11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 14 Jun 2020 15:34:01 +0200 Subject: [PATCH 2/6] XEP-0329: Add 0.4.1 revision block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- xep-0329.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xep-0329.xml b/xep-0329.xml index fa230c55..4e1a8821 100644 --- a/xep-0329.xml +++ b/xep-0329.xml @@ -32,6 +32,12 @@ j.lagrange@jabber.org &lance; + + 0.4.1 + 2020-06-14 + fs + Fix example 7, remove superfluous 'node' attribute + 0.4 2017-09-11 From bf5bace92ea6ea0ab227f27cdfce245b5969dea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sun, 14 Jun 2020 15:34:20 +0200 Subject: [PATCH 3/6] ci: do not include deleted files in the changed builds --- tools/ci-changed-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci-changed-builds.sh b/tools/ci-changed-builds.sh index d7e34829..df7f50c0 100755 --- a/tools/ci-changed-builds.sh +++ b/tools/ci-changed-builds.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail IFS=$'\n' -filenames="$(git diff-tree -r --no-commit-id --name-only HEAD "$1" | ( grep -P '^(xep-[0-9]{4}|inbox/[^/]+)\.xml$' || true))" +filenames="$(git diff-tree -r --no-commit-id --name-status "$1" HEAD | ( grep -P '^[AM]\t(xep-[0-9]{4}|inbox/[^/]+)\.xml$' || true) | cut -f2)" if [ -z "$filenames" ]; then exit 0 fi From b028cca04dada48063e1bf31e037862a7e07a5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sun, 14 Jun 2020 15:34:57 +0200 Subject: [PATCH 4/6] ci: use git merge-base to detect changed files This prevents false positives if the branch is not rebased on current main. --- tools/ci-changed-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci-changed-builds.sh b/tools/ci-changed-builds.sh index df7f50c0..192fa228 100755 --- a/tools/ci-changed-builds.sh +++ b/tools/ci-changed-builds.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail IFS=$'\n' -filenames="$(git diff-tree -r --no-commit-id --name-status "$1" HEAD | ( grep -P '^[AM]\t(xep-[0-9]{4}|inbox/[^/]+)\.xml$' || true) | cut -f2)" +filenames="$(git diff-tree -r --no-commit-id --name-status "$(git merge-base "$1" HEAD)" HEAD | ( grep -P '^[AM]\t(xep-[0-9]{4}|inbox/[^/]+)\.xml$' || true) | cut -f2)" if [ -z "$filenames" ]; then exit 0 fi From 7941813d793f097a93d644de31bf593d60c978f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sun, 14 Jun 2020 15:40:11 +0200 Subject: [PATCH 5/6] ci: correctly detect outdated branches --- tools/ci-changed-builds.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/ci-changed-builds.sh b/tools/ci-changed-builds.sh index 192fa228..63ea318a 100755 --- a/tools/ci-changed-builds.sh +++ b/tools/ci-changed-builds.sh @@ -1,7 +1,12 @@ #!/bin/bash set -euo pipefail IFS=$'\n' -filenames="$(git diff-tree -r --no-commit-id --name-status "$(git merge-base "$1" HEAD)" HEAD | ( grep -P '^[AM]\t(xep-[0-9]{4}|inbox/[^/]+)\.xml$' || true) | cut -f2)" +if ! merge_base="$(git merge-base "$1" HEAD)"; then + echo 'Failed to find merge base to detect changed files' >&2 + echo 'This indicates that your branch is too old and needs to be rebased' >&2 + exit 2 +fi +filenames="$(git diff-tree -r --no-commit-id --name-status "$merge_base" HEAD | ( grep -P '^[AM]\t(xep-[0-9]{4}|inbox/[^/]+)\.xml$' || true) | cut -f2)" if [ -z "$filenames" ]; then exit 0 fi From 498bb4c56eeb453b5295b8f53234afb53af6cab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sun, 14 Jun 2020 15:41:23 +0200 Subject: [PATCH 6/6] ci: increase fetch depth for changed file detection This is required to accomodate branches which are slightly behind master. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4e25a57..52abb9d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,7 @@ stages: script: - python3 tools/ci-restore-timestamps.py - make html inbox-html - - git fetch --depth=1 origin main + - git fetch --depth=50 origin main - bash tools/ci-changed-builds.sh origin/main rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'