From nobody Wed Jul 20 13:10:29 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lnwzn6pDWz4X0cN; Wed, 20 Jul 2022 13:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lnwzn6Mwjz3WHn; Wed, 20 Jul 2022 13:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658322629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ogE4lzS31aKYsClMtYdng/DDSvY8AG083bXTjcZJbNQ=; b=RHTEYHGndpYDZwadS4xr4Cu9H3dtw4Wj0M8j2+g4rllYvv+2rHJqXZBojniOA50uKlJl6y qdWc0GfEzwtAi1Ppa3WgGkImnHE2r7nIvtDgaAwqhQFbr7Jq35SPUKAov+krlkwvg6QBl+ 6Ay1vvYhWQV5Hj1BZL1SJTsoWYz1oj9H/oyLf5OQCAy6OWtEzreejiTguNe92v9AZDr3NL hlUvephpnYvLF2JWMeSnJWHynuxe58zdfTv1qmhNjPl6F+hDL2ZMNb9D08ONpdJVPw3Jp2 NDTmysOewWdJTYeRnMU5Csw4SA1xaQVQpnMQbJzewEtLPPAOe6DkWUZN+OEGBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lnwzn5TgwzyfZ; Wed, 20 Jul 2022 13:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26KDAT3B037048; Wed, 20 Jul 2022 13:10:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26KDAT5Z037047; Wed, 20 Jul 2022 13:10:29 GMT (envelope-from git) Date: Wed, 20 Jul 2022 13:10:29 GMT Message-Id: <202207201310.26KDAT5Z037047@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Tobias C. Berner" Subject: git: 242b704fb593 - main - framework: add hook to notify about lingering 'Created by' lines List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tcberner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 242b704fb593876a9945cd5888e1f7804df3f0d3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658322629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ogE4lzS31aKYsClMtYdng/DDSvY8AG083bXTjcZJbNQ=; b=ZE+8+3jp/wCfojy114GXa+vHaLuds4g74511SQehY6k9le0g7TPZ5AbTfYBToQDs4Hfmq4 Q/fMoR88lHv53B3Hr446kmUDF9EkVveQ4Gjxl9eVfdWDg/gD415MPNYeoT0Lyx2cm2RrGo Y5OOtLM/i5rnspzTnqQImlBc24KxSSzwvbMXe87ywqf2vTLAyHInntXj+l6cboQ3Wdxy0h 2H/7kjcXQ2z5x+iKpCBBL78Zigo773vh7GR1m2KdGlOiG24ZVkBvXHMpPvVMisf9dH6XjF G8PW6Ak+l6M65KPj1x+TuD2RvreAFkDpq8JsTJz9PZaI0B4SKD34xJm0fNYH3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658322629; a=rsa-sha256; cv=none; b=HzqlKlv7yfHNySIP3/gC5tEGKvYK/GrxP06PdVYm6o043l77btSgsiF7LsO55qXsUTE/3B 1SICZDOcL3m8vH5Astt85KOSSAdjlMYq5agezVukc1WXOT3rF2fuVW/A4P74thgWuIbkeN 2PG7Xh1Ug9JdrMm6TZTclymn6BvV0PaeLIJ+G4Jw6uNzrMdeZME6fVJRJq2SGArcugDqrI ZJemfkJK3G46apLp1+u9JoZs1W6XI8rX+qyFzP0ef7AS9ZmPAfJq0w8LeKQHQK5XRTOYvc KQBk5IR5MfkCcTXDBsBInx83yDXP0AL/T6k7kQtg+iRMHraY9QKgQdp7uyzSFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tcberner: URL: https://cgit.FreeBSD.org/ports/commit/?id=242b704fb593876a9945cd5888e1f7804df3f0d3 commit 242b704fb593876a9945cd5888e1f7804df3f0d3 Author: Tobias C. Berner AuthorDate: 2022-07-20 13:08:21 +0000 Commit: Tobias C. Berner CommitDate: 2022-07-20 13:09:29 +0000 framework: add hook to notify about lingering 'Created by' lines --- .hooks/pre-commit.d/check_created_by | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.hooks/pre-commit.d/check_created_by b/.hooks/pre-commit.d/check_created_by new file mode 100755 index 000000000000..6e4d8d8bc3cc --- /dev/null +++ b/.hooks/pre-commit.d/check_created_by @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Check that ports do not contain a 'Created by' tag +# + +makefiles=$(git diff --name-only --cached --diff-filter=ACMR | grep -E '^[^/]+/[^/]+/Makefile$') +if [ $? -eq 0 ] ; then + for makefile in ${makefiles} ; do + created_by=$(head -n1 ${makefile} | awk -F : '/Created by/{print $NF}') + if [ -n "${created_by}" ] ; then + echo -e "[pre-commit] ERROR: ${makefile} contains obsolete 'Created by' line\n" \ + " Please remove the the line, and append:\n\n" \ + " - Removed 'Created by ${created_by}'.\n\n" \ + " to your commit message." + exit 1 + fi + done +fi