Did anybody run into “harp compile” problem with the latest crosswalk-website? Any help is appreciated. Thanks!
[xiaosong@xiaosong-desktop crosswalk-website]$ harp compile "Parse Error: <?php\n\t/*\n\t * Copyright (c) 2012 by Eric Schultz.\n\t *\n\t * Issued under the MIT License\n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), \n\t * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, \n\t * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t */\n\t \n\tset_time_limit(90);\n\n\tinclude '../util/local-config.php';\n\n\t// Make sure the configuration is setup\n\tif (!isset($arrConfig) || empty($arrConfig)) {\n\t\terror_log(\"GitHub Webhook Error: missing local-config.php or no configuration definitions setup\");\n\t\texit;\n\t}\n\n\t// Check for the GitHub WebHook Payload\n\tif (!isset($_POST['payload'])) {\n\t\terror_log(\"GitHub Webhook Error: missing expected POST parameter 'payload'\");\n\t\texit;\n\t}\n \n // Check for the HTTP_X_HUB_SIGNATURE\n if(!isset($_SERVER['HTTP_X_HUB_SIGNATURE'])) {\n \thttp_response_code(401);\n \terror_log(\"GitHub Webhook Error: Secret (X-Hub-Signature header) is missing from request. Have you set a secret in GitHub's project settings?\");\n }\n\n\t// Grab the tastylious JSON payload from GitHub\n\t$objPayload = json_decode(stripslashes($_POST['payload']));\n\n // Get the request body\n $payloadBody = false;\n switch($_SERVER['CONTENT_TYPE']) {\n \tcase 'application/json':\n \t\techo \"Received JSON data in body.\\n\";\n \t\t$payloadBody = file_get_contents('php://input');\n \t\tbreak;\n \tcase 'application/x-www-form-urlencoded':\n \t\techo \"Received URL-encoded form data in body.\\n\";\n \t\t$payloadBody = file_get_contents('php://input');\n \t\tbreak;\n \tdefault:\n \t\thttp_response_code(400);\n \t\terror_log(\"GitHub Webhook Error: Don't know what to do with {$_SERVER['CONTENT_TYPE']} content type.\");\n } \n if(!$payloadBody) {\n \thttp_response_code(400);\n \terror_log('GitHub Webhook Error: No POST body sent.');\n }\n \n\t// Loop through the configs to see which one matches the payload\n\tforeach ($arrConfig as $strSiteName => $arrSiteConfig) {\n\t\t\n\t\t// Merge in site config defaults\n\t\t$arrSiteConfig = array_merge(\n\t\t\tarray(\n\t\t\t\t'repository' => '*',\n 'secretkey' => '*',\n\t\t\t\t'branch' => '*',\n 'server' => '*',\n\t\t\t\t'execute' => array()\n\t\t\t), \n\t\t\t$arrSiteConfig\n\t\t);\n \n // Hashed secret key\n $secretKey = \"sha1=\" . hash_hmac('sha1', $payloadBody, $arrSiteConfig['secretkey'], false);\n \n // Secret key check\n if(($arrSiteConfig['secretkey'] != '*') && md5($secretKey) !== md5($_SERVER['HTTP_X_HUB_SIGNATURE'])) {\n error_log(\"GitHub Webhook Error: Secret (X-Hub-Signature header) is wrong or does not match request body.\");\n exit();\n }\n\n\t\t// Repository name check\n\t\tif (($arrSiteConfig['repository'] != '*') && ($arrSiteConfig['repository'] != $objPayload->repository->name)) {\n error_log(\"GitHub Webhook Error: Repository sent does not match local-config.\");\n exit();\n\t\t}\n\t\t \n\t\t// Release and production check\n\t\tif (($arrSiteConfig['server'] == 'production') && (isset($objPayload->release)) && ($objPayload->release->draft != 'true') && ($objPayload->release->prerelease != 'true')) {\n\t\t\t$arrSiteConfig['execute'] = (array)$arrSiteConfig['execute'];\n\n\t\t\tforeach ($arrSiteConfig['execute'] as $arrCommand) {\n\t\t\t\t$arrOutput = array();\n\t\t\t\texec($arrCommand, $arrOutput);\n\n\t\t\t\tif (isset($boolDebugLogging) && $boolDebugLogging) {\n\t\t\t\t\terror_log(\"GitHub Webhook Update (\" . $strSiteName . \"):\\n\" . implode(\"\\n\", $arrOutput));\n\t\t\t\t}\n\t\t\t}\n }\n \n\t\t// Push and non-production check\n\t\telseif (($arrSiteConfig['server'] != 'production') && (isset($objPayload->ref)) && ($arrSiteConfig['branch'] != '*') && ('refs/heads/'.$arrSiteConfig['branch'] == $objPayload->ref)) {\n\t\t\t$arrSiteConfig['execute'] = (array)$arrSiteConfig['execute'];\n\n\t\t\tforeach ($arrSiteConfig['execute'] as $arrCommand) {\n\t\t\t\t$arrOutput = array();\n\t\t\t\texec($arrCommand, $arrOutput);\n\n\t\t\t\tif (isset($boolDebugLogging) && $boolDebugLogging) {\n\t\t\t\t\terror_log(\"GitHub Webhook Update (\" . $strSiteName . \"):\\n\" . implode(\"\\n\", $arrOutput));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}
_______________________________________________ Crosswalk-dev mailing list Crosswalk-dev@lists.crosswalk-project.org https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev