From 51c28a4316839e4b639ee649682695e637742d83 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 18:19:43 -0400 Subject: [PATCH 1/3] common/travis/xlint: make xlint only fatal for new templates to help updates and other changes go more smoothly, xlint should only cause a CI failure if the linted template is new. --- common/travis/changed_templates.sh | 15 ++++++++++++++- common/travis/xlint.sh | 10 ++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh index 91af1f1a3c1a..124ede1b1746 100755 --- a/common/travis/changed_templates.sh +++ b/common/travis/changed_templates.sh @@ -20,9 +20,22 @@ base="$(git merge-base origin/HEAD "$tip")" echo "$base $tip" >/tmp/revisions /bin/echo -e '\x1b[32mChanged packages:\x1b[0m' -git diff-tree -r --no-renames --name-only --diff-filter=AM \ +git diff-tree -r --no-renames --name-only --diff-filter=M \ "$base" "$tip" \ -- 'srcpkgs/*/template' | cut -d/ -f 2 | tee /tmp/templates | sed "s/^/ /" >&2 +/bin/echo -e '\x1b[32mNew packages:\x1b[0m' +git diff-tree -r --no-renames --name-only --diff-filter=A \ + "$base" "$tip" \ + -- 'srcpkgs/*/template' | + cut -d/ -f 2 | + tee -a /tmp/templates | + tee /tmp/new-templates | + sed "s/^/ /" >&2 + +set -x +cat /tmp/templates +cat /tmp/new-templates +set +x diff --git a/common/travis/xlint.sh b/common/travis/xlint.sh index 790791ef1733..78313c252ef2 100755 --- a/common/travis/xlint.sh +++ b/common/travis/xlint.sh @@ -4,6 +4,7 @@ [ "$XLINT" ] || exit 0 +set -x EXITCODE=0 read base tip < /tmp/revisions @@ -11,8 +12,13 @@ common/scripts/lint-commits $base $tip || EXITCODE=$? for t in $(awk '{ print "srcpkgs/" $0 "/template" }' /tmp/templates); do /bin/echo -e "\x1b[32mLinting $t...\x1b[0m" - xlint "$t" > /tmp/xlint_out || EXITCODE=$? - common/scripts/lint-version-change "$t" $base $tip > /tmp/vlint_out || EXITCODE=$? + if grep -q "^$t\$" /tmp/new-templates; then + # only fatal if xlint fails for new templates + xlint "$t" > /tmp/xlint_out || EXITCODE=$? + else + xlint "$t" > /tmp/xlint_out || true + fi + common/scripts/lint-version-change "srcpkgs/$t/template" $base $tip > /tmp/vlint_out || EXITCODE=$? awk -f common/scripts/lint2annotations.awk /tmp/xlint_out /tmp/vlint_out done exit $EXITCODE From 729746d14e0cb823ccb00482901683b8d421ab66 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 18:28:42 -0400 Subject: [PATCH 2/3] chezmoi: temp --- srcpkgs/chezmoi/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template index 074ef8b8c602..8d2d18be6757 100644 --- a/srcpkgs/chezmoi/template +++ b/srcpkgs/chezmoi/template @@ -1,7 +1,7 @@ -# Template file for 'chezmoi' +# Template file for 'chezmoiasdfsdf' pkgname=chezmoi version=2.34.3 -revision=1 +revision=2 build_style=go go_import_path="github.com/twpayne/chezmoi/v2" go_build_tags="noembeddocs noupgrade" From dbc2e205f9e8456ed9b87ee1d521e861b597354f Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 18:29:12 -0400 Subject: [PATCH 3/3] New package: foobar-. this is a test --- srcpkgs/foobar/template | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 srcpkgs/foobar/template diff --git a/srcpkgs/foobar/template b/srcpkgs/foobar/template new file mode 100644 index 000000000000..bb27fee2a740 --- /dev/null +++ b/srcpkgs/foobar/template @@ -0,0 +1,22 @@ +# Template file for 'foobar' +pkgname=foobar +version=1 +revision=1 +#archs="i686 x86_64" +#build_wrksrc= +build_style=meta +#configure_args="" +#make_build_args="" +#make_install_args="" +#conf_files="" +#make_dirs="/var/log/dir 0755 root root" +# hostmakedepends="" +# makedepends="" +# depends="" +short_desc="Blah" +maintainer="classabbyamp " +license="GPL-3.0-or-later" +homepage="a" +#changelog="" +# distfiles="" +checksum=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb