trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] branch master updated: Adds a trivial script to fetch and apply a PR patch
Date Fri, 02 Sep 2016 19:19:50 GMT
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  6c32d1c   Adds a trivial script to fetch and apply a PR patch
6c32d1c is described below

commit 6c32d1c829f93a1b800d3a1edf35f55662b11c97
Author: Leif Hedstrom <zwoop@apache.org>
AuthorDate: Fri Sep 2 13:19:11 2016 -0600

    Adds a trivial script to fetch and apply a PR patch
---
 tools/apply-pr.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tools/apply-pr.sh b/tools/apply-pr.sh
new file mode 100755
index 0000000..1cb6399
--- /dev/null
+++ b/tools/apply-pr.sh
@@ -0,0 +1,32 @@
+#! /usr/bin/env bash
+#
+#  Simple wrapper to run clang-format on a bunch of files
+#
+#  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.
+
+set -e # exit on error
+
+PR="$1"
+URI="https://patch-diff.githubusercontent.com/raw/apache/trafficserver/pull/${PR}.diff"
+
+if [[ "$PR" =~ ^[0-9]+$ ]];  then
+    echo "Applying changes from $URI ..."
+    curl -s $URI | patch -p1
+else
+    echo "$PR is not a valid pull request"
+    exit -1
+fi

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message