LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] perf doc: Set man page date to last git commit
@ 2020-03-11  5:21 Ian Rogers
  2020-03-11 13:25 ` Arnaldo Carvalho de Melo
  2020-03-19 14:10 ` [tip: perf/core] " tip-bot2 for Ian Rogers
  0 siblings, 2 replies; 3+ messages in thread
From: Ian Rogers @ 2020-03-11  5:21 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Thomas Gleixner, Greg Kroah-Hartman, Mukesh Ojha, Masanari Iida,
	linux-kernel, linux-perf-users
  Cc: Stephane Eranian, Ian Rogers

Currently the man page dates reflect the date the man pages were built.
This patch adjusts the date so that the date is when then man page
last had a commit against it. The date is generated using 'git log'.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/Documentation/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index adc5a7e44b98..31824d5269cc 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -295,7 +295,10 @@ $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml
 $(OUTPUT)%.xml : %.txt
 	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
 	$(ASCIIDOC) -b docbook -d manpage \
-		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \
+		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) \
+		-aperf_date=$(shell git log -1 --pretty="format:%cd" \
+				--date=short $<) \
+		-o $@+ $< && \
 	mv $@+ $@
 
 XSLT = docbook.xsl
-- 
2.25.1.481.gfbce0eb801-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf doc: Set man page date to last git commit
  2020-03-11  5:21 [PATCH] perf doc: Set man page date to last git commit Ian Rogers
@ 2020-03-11 13:25 ` Arnaldo Carvalho de Melo
  2020-03-19 14:10 ` [tip: perf/core] " tip-bot2 for Ian Rogers
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-03-11 13:25 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Thomas Gleixner, Greg Kroah-Hartman,
	Mukesh Ojha, Masanari Iida, linux-kernel, linux-perf-users,
	Stephane Eranian

Em Tue, Mar 10, 2020 at 10:21:10PM -0700, Ian Rogers escreveu:
> Currently the man page dates reflect the date the man pages were built.
> This patch adjusts the date so that the date is when then man page
> last had a commit against it. The date is generated using 'git log'.

Thanks, applied,

Please consider changing the Makefile to make it be a dependency of the
man pages, so that when we change it we rebuild the man pages, I had to
go fresh to see the results :-)

I.e. had to do this:

Committer testing:

  $ git log -1 --pretty="format:%cd" --date=short tools/perf/Documentation/perf-top.txt
  2020-01-14

Before:

  rm -rf /tmp/build/perf
  mkdir -p /tmp/build/perf
  make -C tools/perf O=/tmp/build/perf/ install
  $ date
  Wed 11 Mar 2020 10:21:19 AM -03
  $ man perf-top | tail -1
  perf                    03/11/2020           PERF-TOP(1)
  $

After:

  rm -rf /tmp/build/perf
  mkdir -p /tmp/build/perf
  make -C tools/perf O=/tmp/build/perf/ install
  $ date
  $ date
  Wed 11 Mar 2020 10:24:06 AM -03
  $ man perf-top | tail -1
  perf                    2020-01-14           PERF-TOP(1)
  $


- Arnaldo
 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/Documentation/Makefile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
> index adc5a7e44b98..31824d5269cc 100644
> --- a/tools/perf/Documentation/Makefile
> +++ b/tools/perf/Documentation/Makefile
> @@ -295,7 +295,10 @@ $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml
>  $(OUTPUT)%.xml : %.txt
>  	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
>  	$(ASCIIDOC) -b docbook -d manpage \
> -		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \
> +		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) \
> +		-aperf_date=$(shell git log -1 --pretty="format:%cd" \
> +				--date=short $<) \
> +		-o $@+ $< && \
>  	mv $@+ $@
>  
>  XSLT = docbook.xsl
> -- 
> 2.25.1.481.gfbce0eb801-goog
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: perf/core] perf doc: Set man page date to last git commit
  2020-03-11  5:21 [PATCH] perf doc: Set man page date to last git commit Ian Rogers
  2020-03-11 13:25 ` Arnaldo Carvalho de Melo
@ 2020-03-19 14:10 ` tip-bot2 for Ian Rogers
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Ian Rogers @ 2020-03-19 14:10 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Ian Rogers, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Greg Kroah-Hartman, Jiri Olsa, Mark Rutland, Masanari Iida,
	Mukesh Ojha, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Thomas Gleixner, x86, LKML

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     0c2d041232411c8124136c9497c0e352dcf18baa
Gitweb:        https://git.kernel.org/tip/0c2d041232411c8124136c9497c0e352dcf18baa
Author:        Ian Rogers <irogers@google.com>
AuthorDate:    Tue, 10 Mar 2020 22:21:10 -07:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Wed, 11 Mar 2020 10:48:44 -03:00

perf doc: Set man page date to last git commit

Currently the man page dates reflect the date the man pages were built.
This patch adjusts the date so that the date is when then man page
last had a commit against it. The date is generated using 'git log'.

Committer testing:

  $ git log -1 --pretty="format:%cd" --date=short tools/perf/Documentation/perf-top.txt
  2020-01-14

Before:

  rm -rf /tmp/build/perf
  mkdir -p /tmp/build/perf
  make -C tools/perf O=/tmp/build/perf/ install
  $ date
  Wed 11 Mar 2020 10:21:19 AM -03
  $ man perf-top | tail -1
  perf                    03/11/2020           PERF-TOP(1)
  $

After:

  rm -rf /tmp/build/perf
  mkdir -p /tmp/build/perf
  make -C tools/perf O=/tmp/build/perf/ install
  $ date
  $ date
  Wed 11 Mar 2020 10:24:06 AM -03
  $ man perf-top | tail -1
  perf                    2020-01-14           PERF-TOP(1)
  $

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Mukesh Ojha <mojha@codeaurora.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20200311052110.23132-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index adc5a7e..31824d5 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -295,7 +295,10 @@ $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml
 $(OUTPUT)%.xml : %.txt
 	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
 	$(ASCIIDOC) -b docbook -d manpage \
-		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \
+		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) \
+		-aperf_date=$(shell git log -1 --pretty="format:%cd" \
+				--date=short $<) \
+		-o $@+ $< && \
 	mv $@+ $@
 
 XSLT = docbook.xsl

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-19 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11  5:21 [PATCH] perf doc: Set man page date to last git commit Ian Rogers
2020-03-11 13:25 ` Arnaldo Carvalho de Melo
2020-03-19 14:10 ` [tip: perf/core] " tip-bot2 for Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).