Re: [PATCH] contrib/persistent-https: use Git version for build label
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 22, 2016, 17:58 UTC
- Message-ID
- <xmqqwpkda71x.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAOiOGAfWfEy60qg3AbbPNqkvJDMsXBHY8ZSXBCKJYha_gDB8mw@mail.gmail.com>
Parker Moore <parkrmoore@gmail.com> writes:
Show 11 quoted lines
> diff --git a/contrib/persistent-https/Makefile > b/contrib/persistent-https/Makefile > index 92baa3be..8248269 100644 > --- a/contrib/persistent-https/Makefile > +++ b/contrib/persistent-https/Makefile > @@ -12,7 +12,7 @@ > # See the License for the specific language governing permissions and > # limitations under the License. > > -BUILD_LABEL=$(shell date +"%s") > +BUILD_LABEL=$(shell cat ../../GIT-VERSION-FILE | cut -d" " -f3)
We tend to avoid catting a single file only to pipe the result into a different command, so I'd rewrite this like so:
BUILD_LABEL=$(shell cut -d" " -f3 ../../GIT-VERSION-FILE)
while queuing.
Thanks.