Return-Path: X-Original-To: apmail-helix-commits-archive@minotaur.apache.org Delivered-To: apmail-helix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A2CAD106EA for ; Wed, 13 Nov 2013 18:14:25 +0000 (UTC) Received: (qmail 21151 invoked by uid 500); 13 Nov 2013 18:14:25 -0000 Delivered-To: apmail-helix-commits-archive@helix.apache.org Received: (qmail 21118 invoked by uid 500); 13 Nov 2013 18:14:24 -0000 Mailing-List: contact commits-help@helix.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@helix.incubator.apache.org Delivered-To: mailing list commits@helix.incubator.apache.org Received: (qmail 21110 invoked by uid 99); 13 Nov 2013 18:14:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 18:14:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 13 Nov 2013 18:14:21 +0000 Received: (qmail 20234 invoked by uid 99); 13 Nov 2013 18:13:59 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 18:13:59 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2E29D8A8251; Wed, 13 Nov 2013 18:13:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kanak@apache.org To: commits@helix.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: [HELIX-304] Add rat check to hpost-review, add missing license header Date: Wed, 13 Nov 2013 18:13:59 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Updated Branches: refs/heads/master b3eca30dd -> f3dd63312 [HELIX-304] Add rat check to hpost-review, add missing license header Project: http://git-wip-us.apache.org/repos/asf/incubator-helix/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-helix/commit/f3dd6331 Tree: http://git-wip-us.apache.org/repos/asf/incubator-helix/tree/f3dd6331 Diff: http://git-wip-us.apache.org/repos/asf/incubator-helix/diff/f3dd6331 Branch: refs/heads/master Commit: f3dd63312d75910e78821fbe3054b4c4150992c0 Parents: b3eca30 Author: Kanak Biscuitwala Authored: Wed Nov 13 09:43:37 2013 -0800 Committer: Kanak Biscuitwala Committed: Wed Nov 13 09:51:14 2013 -0800 ---------------------------------------------------------------------- .../apache/helix/TestHelixVersionCompare.java | 19 +++++++++++++++++++ hpost-review.sh | 15 +++++++++++++++ 2 files changed, 34 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f3dd6331/helix-core/src/test/java/org/apache/helix/TestHelixVersionCompare.java ---------------------------------------------------------------------- diff --git a/helix-core/src/test/java/org/apache/helix/TestHelixVersionCompare.java b/helix-core/src/test/java/org/apache/helix/TestHelixVersionCompare.java index ede570a..489369e 100644 --- a/helix-core/src/test/java/org/apache/helix/TestHelixVersionCompare.java +++ b/helix-core/src/test/java/org/apache/helix/TestHelixVersionCompare.java @@ -1,5 +1,24 @@ package org.apache.helix; +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + import org.testng.Assert; import org.testng.annotations.Test; http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f3dd6331/hpost-review.sh ---------------------------------------------------------------------- diff --git a/hpost-review.sh b/hpost-review.sh index 0f1f5a1..7ccc41c 100755 --- a/hpost-review.sh +++ b/hpost-review.sh @@ -35,7 +35,19 @@ REVLIST=$1; JIRA=$2 shift 2; +# Run the rat plugin +echo 'Checking source for license headers' +mvn -Prat -DskipTests > /dev/null +RAT_STATUS=$? + +if [[ $RAT_STATUS -ne 0 ]] ; then + echo "Maven rat plugin failed. Add license headers and try again." + exit 1; +fi; +echo 'Checking source for license headers: PASSED' + # Check if the commit is prefixed with [HELIX-NNN] +echo 'Checking commit message format' BUG_NAME=HELIX-$JIRA COMMIT_PREFIX=\[$BUG_NAME\] DESCRIPTION=$(git log --pretty=format:%s $REVLIST) @@ -44,8 +56,10 @@ if [[ "$DESCRIPTION" != "$COMMIT_PREFIX"* ]] ; then echo "Commit message must start with $COMMIT_PREFIX" usage fi; +echo 'Checking commit message format: PASSED' # Check if HELIX-NNN is a valid bug +echo 'Checking JIRA existence' JIRA_URL=https://issues.apache.org/jira/rest/api/latest/issue/$BUG_NAME JIRA_STATUS=$(curl -o /dev/null --silent --head --write-out '%{http_code}\n' $JIRA_URL) @@ -53,6 +67,7 @@ if [[ $JIRA_STATUS -eq 404 ]]; then echo "$BUG_NAME does not exist in JIRA" usage fi; +echo 'Checking JIRA existence: PASSED' post-review --server="https://reviews.apache.org" --target-groups=helix --summary="$(git log --pretty=format:%s $REVLIST)" --description="$(git whatchanged $REVLIST)" --diff-filename=<(git diff --no-prefix $REVLIST) -o --bugs-closed=$BUG_NAME $*