From patchwork Mon May 2 21:07:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 67049 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp255804qge; Mon, 2 May 2016 14:16:03 -0700 (PDT) X-Received: by 10.107.202.68 with SMTP id a65mr27673930iog.20.1462223762875; Mon, 02 May 2016 14:16:02 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 74si654780iok.38.2016.05.02.14.16.02; Mon, 02 May 2016 14:16:02 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 022F46160F; Mon, 2 May 2016 21:16:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id E051E610D5; Mon, 2 May 2016 21:15:57 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DF14061101; Mon, 2 May 2016 21:15:55 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by lists.linaro.org (Postfix) with ESMTPS id 920C86106A for ; Mon, 2 May 2016 21:15:54 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id y84so871122lfc.0 for ; Mon, 02 May 2016 14:15:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MqnM9f9+WdceR/YNTivvNKl8QQZha53z1sFQ51nfdrw=; b=X+zaJl6aGVz+VYevc2tmNV7My4Mbj7WV2h+59LZX5Ck/3STtyWgKFES8uYrf/wrB0W 8FzpMlKQ7uxFVAgX+p96YBfwuTu5VFBRcihhvTeoCeOHRSTu6LYpY4B05LUU3GOVsFtw wV+CeioZScaooBf7751E8a0JBvW7CvGNSFCVdDw8p6O787O8SwVnsADQkcRF8CQPoj81 /qrQWcgaCVln1EiWBw0NMmedyOgEYEuZ5u0/zIPMJyq6ZsDBZTfxKm7nKmGFfPuo5IDe aG9kGcrA7NZUcJ6qrBb2FMIGr8cIaqS1kcSo79SptpolzkW8vAt21SYmsBzT5YQ+GFxN qV5Q== X-Gm-Message-State: AOPr4FWehaZGXPg+cpIVL60Fbrsa3l/AeAU0ZvvMXCXFqzgTCtdvd8sAdgFMMd6cx4Laf7Py3V8= X-Received: by 10.25.73.212 with SMTP id w203mr13371465lfa.22.1462223752840; Mon, 02 May 2016 14:15:52 -0700 (PDT) Received: from localhost (c-c82171d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.113.33.200]) by smtp.gmail.com with ESMTPSA id mz2sm14332lbb.18.2016.05.02.14.15.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 May 2016 14:15:52 -0700 (PDT) From: Anders Roxell To: mike.holmes@linaro.org, ricardo.salveti@linaro.org Date: Mon, 2 May 2016 23:07:47 +0200 Message-Id: <1462223267-28942-1-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH] scripts/git_hash: match more digits X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Make it possible to match more digits than groups of one. Signed-off-by: Anders Roxell Reviewed-by: Ricardo Salveti --- scripts/git_hash.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh index 6ba265e..336eb01 100755 --- a/scripts/git_hash.sh +++ b/scripts/git_hash.sh @@ -7,7 +7,8 @@ fi ROOTDIR=${1} if [ -d ${ROOTDIR}/.git ]; then - hash=$(git --git-dir=${ROOTDIR}/.git describe --match 'v?\.?\.?\.?' | tr -d "\n") + hash=$(git --git-dir=${ROOTDIR}/.git describe --match 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'\ + | tr -d "\n") if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \ | tail -n1) != "" ]]; then dirty=.dirty