From: Alexey Gladkov <legion@altlinux.ru> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: Re: [devel] [PATCH 1/3] Introduce nodiff directive for gear-rules Date: Thu, 26 Nov 2020 16:51:50 +0100 Message-ID: <20201126155150.6kaw4f4xbjitoyrm@example.org> (raw) In-Reply-To: <20201126151701.zm627zsqorxzd52z@example.org> On Thu, Nov 26, 2020 at 04:17:01PM +0100, Alexey Gladkov wrote: > > В этом плане > > > > tar: v@version@:. > > diff: v@version@:. exclude=.gear > > > > по-моему выглядит менее красиво. Но я могу подготовить и такой вариант. > > Для меня это выглядит более понятно так как первый вариант выглядит > понятно только если знать, что nodiff это опция директивы diff. > > Если хотите увеличить читабильность, то давайте реализуем многострочные > директивы. Тогда можно будет написать: > > tar: v@version@:. > diff: v@version@:. . \ > name=@new_dir@-@version@-@release@.patch \ > exclude=.gear Быстрый патч, который позволит сделать такое. Нужно проверить не сломаются ли какие-нибудь gear-rules. Signed-off-by: Alexey Gladkov <legion@altlinux.org> --- gear | 3 ++- tests/gear-rules-diff-tag-tag-name.test | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gear b/gear index 6282c92..3c95eaa 100755 --- a/gear +++ b/gear @@ -575,7 +575,8 @@ parse_rules() done <"$workdir/rules" lineno=0 - while read -r cmd options; do + # shellcheck disable=SC2162 + while read cmd options; do lineno="$((lineno+1))" local optional=0 case "$cmd" in diff --git a/tests/gear-rules-diff-tag-tag-name.test b/tests/gear-rules-diff-tag-tag-name.test index 9c244d8..2234be3 100644 --- a/tests/gear-rules-diff-tag-tag-name.test +++ b/tests/gear-rules-diff-tag-tag-name.test @@ -24,12 +24,11 @@ gear_rules_diff_tag_tag_name() # test entry point git tag -a -m t1 v2 git rm -q -f $dst/file mkdir .gear - printf '%s: %s %s %s\n' \ - "$gear_directive" \ - "v1:${src%/*}/@name@-v@version@" \ - "v2:${dst%/*}/@name@-r@release@" \ - "name=@name@-@old_dir@-@new_dir@-@version@-@release@.diff" \ - >.gear/rules + cat >.gear/rules <<-EOF + $gear_directive: \ + v1:${src%/*}/@name@-v@version@ v2:${dst%/*}/@name@-r@release@ \ + name=@name@-@old_dir@-@new_dir@-@version@-@release@.diff + EOF git add .gear/rules gear-store-tags -a git commit -q -a -m 3 -- 2.25.4
next prev parent reply other threads:[~2020-11-26 15:51 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-26 14:16 Vladimir D. Seleznev 2020-11-26 14:16 ` [devel] [PATCH 2/3] tests: add test for nodiff directive Vladimir D. Seleznev 2020-11-26 14:16 ` [devel] [PATCH 3/3] tests: check nodiff does not fail if pattern matches no file Vladimir D. Seleznev 2020-11-26 14:49 ` [devel] [PATCH 1/3] Introduce nodiff directive for gear-rules Alexey Gladkov 2020-11-26 14:54 ` Vladimir D. Seleznev 2020-11-26 15:17 ` Alexey Gladkov 2020-11-26 15:20 ` Anton Farygin 2020-11-26 15:51 ` Alexey Gladkov [this message] 2020-12-09 2:10 ` Dmitry V. Levin 2020-12-09 10:40 ` Alexey Gladkov 2020-12-09 14:39 ` [devel] gear-rules: allow backslashes to escape any characters Dmitry V. Levin 2020-12-09 14:48 ` Vladimir D. Seleznev 2020-12-09 15:51 ` Alexey Gladkov 2020-12-10 10:31 ` Dmitry V. Levin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201126155150.6kaw4f4xbjitoyrm@example.org \ --to=legion@altlinux.ru \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git