You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2019/01/28 16:11:15 UTC

[sling-tooling-release] branch master updated: added a simple script to update the Apache Reporter service after a release

This is an automated email from the ASF dual-hosted git repository.

radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-release.git


The following commit(s) were added to refs/heads/master by this push:
     new e9f1f4c  added a simple script to update the Apache Reporter service after a release
e9f1f4c is described below

commit e9f1f4c3b640fe70083b99659085de0c0b2f1541
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Jan 28 17:10:44 2019 +0100

    added a simple script to update the Apache Reporter service after a release
---
 update_reporter.config |  2 ++
 update_reporter.sh     | 45 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/update_reporter.config b/update_reporter.config
new file mode 100644
index 0000000..9b3c689
--- /dev/null
+++ b/update_reporter.config
@@ -0,0 +1,2 @@
+APACHE_USER="<your user goes here>"
+APACHE_PASSWORD="<your password goes here>"
diff --git a/update_reporter.sh b/update_reporter.sh
new file mode 100755
index 0000000..94bed0c
--- /dev/null
+++ b/update_reporter.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+function display_usage() {
+    echo "$0 <path_to_file_containing_release_names>"
+}
+
+source update_reporter.config
+if [[ -z "${APACHE_USER}" ]]; then
+    echo "Please set the APACHE_USER variable in the update_reporter.config file."
+    exit 1
+fi
+if [[ -z "${APACHE_PASSWORD}" ]]; then
+    echo "Please set the APACHE_PASSWORD variable in the update_reporter.config file."
+    exit 1
+fi
+if [[ -z "$1" ]]; then
+    echo "Please provide a file with the release names, one release name per line."
+    display_usage
+    exit 1
+fi
+BASIC="$(echo -n "$APACHE_USER:$APACHE_PASSWORD" | base64)"
+DATE="`date '+%Y-%m-%d'`"
+EPOCH="`date '+%s'`"
+while IFS='' read -r line || [[ -n "$line" ]]; do
+    release=${line// /+}
+    status=`curl -s -o /dev/null -w "%{http_code}" 'https://reporter.apache.org/addrelease.py' \
+            -H 'Connection: keep-alive' \
+            -H 'Cache-Control: max-age=0' \
+            -H "Authorization: Basic ${BASIC}" \
+            -H 'Origin: https://reporter.apache.org' \
+            -H 'Upgrade-Insecure-Requests: 1' \
+            -H 'Content-Type: application/x-www-form-urlencoded' \
+            -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.20 Safari/537.36' \
+            -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' \
+            -H 'Referer: https://reporter.apache.org/addrelease.html?sling' \
+            -H 'Accept-Encoding: gzip, deflate, br' \
+            --data "date=${EPOCH}&committee=sling&version=${release}&xdate=${DATE}" --compressed`
+    if [[ "$status" -ne 200 ]]; then
+        echo "Failed to update ${line}: got status code ${status}"
+        exit 1
+    fi
+done < "$1"
+
+
+


Re: [sling-tooling-release] branch master updated: added a simple script to update the Apache Reporter service after a release

Posted by Robert Munteanu <ro...@apache.org>.
Thanks!


Re: [sling-tooling-release] branch master updated: added a simple script to update the Apache Reporter service after a release

Posted by Radu Cotescu <ra...@apache.org>.
https://github.com/apache/sling-site/commit/9f5bff311

> On 30 Jan 2019, at 22:34, Robert Munteanu <ro...@apache.org> wrote:
> 
> Hi Radu,
> 
> On Mon, 2019-01-28 at 16:11 +0000, radu@apache.org wrote:
>>    added a simple script to update the Apache Reporter service after
>> a release
> 
> This looks great, one more thing which we automate in the release
> process :-)
> 
> Could I ask you to also mention it on the release management page, so
> that it's more visible?
> 
>  https://sling.apache.org/documentation/development/release-management.html
> 
> Thanks!
> 
> Robert
> 


Re: [sling-tooling-release] branch master updated: added a simple script to update the Apache Reporter service after a release

Posted by Robert Munteanu <ro...@apache.org>.
Hi Radu,

On Mon, 2019-01-28 at 16:11 +0000, radu@apache.org wrote:
>     added a simple script to update the Apache Reporter service after
> a release

This looks great, one more thing which we automate in the release
process :-)

Could I ask you to also mention it on the release management page, so
that it's more visible?

  https://sling.apache.org/documentation/development/release-management.html

Thanks!

Robert