Re: [Linuxwacom-devel] [input-wacom] release.sh: Synchronize with changes made to xf86-input-wacom's release.sh

2018-01-29 Thread Jason Gerecke
Thanks for bringing over the updates. I see two differences of note
that still remain between the xf86-input-wacom and input-wacom version
of the script. Looks like the the former doesn't have DRY_RUN support
for two error conditions. We might want to make a patch for that too.

Reviewed-by: Jason Gerecke 

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two, /
But you can’t take seven from three,/
So you look at the sixty-fours


On Fri, Jan 26, 2018 at 1:52 PM, Aaron Armstrong Skomra
 wrote:
> Signed-off-by: Aaron Armstrong Skomra 
> ---
>  release.sh | 88 
> ++
>  1 file changed, 54 insertions(+), 34 deletions(-)
>
> diff --git a/release.sh b/release.sh
> index f8a484321fdd..3ca2f72d9378 100755
> --- a/release.sh
> +++ b/release.sh
> @@ -15,6 +15,14 @@
>  export LC_ALL=C
>
>  
> #--
> +#  Function: check_for_jq
> +#--
> +#
> +check_for_jq() {
> +command -v jq >/dev/null 2>&1 || { echo >&2 "This script requires jq but 
> it is not installed. Exiting."; exit 1;}
> +}
> +
> +#--
>  #  Function: check_local_changes
>  
> #--
>  #
> @@ -113,10 +121,10 @@ release_to_sourceforge () {
>  section_path="projects/linuxwacom/files/$section"
>  srv_path="/home/frs/project/linuxwacom/$section"
>
> -echo "creating shell on sourceforge for $USER_NAME"
> -ssh ${USER_NAME%@},linuxwacom@$hostname create
> +echo "creating shell on sourceforge for $SF_USERNAME"
> +ssh ${SF_USERNAME%@},linuxwacom@$hostname create
>  #echo "Simply log out once you get to the prompt"
> -#ssh -t ${USER_NAME%@},linuxwacom@$hostname create
> +#ssh -t ${SF_USERNAME%@},linuxwacom@$hostname create
>  #echo "Sleeping for 30 seconds, because this sometimes helps against 
> sourceforge's random authentication denials"
>  #sleep 30
>  fi
> @@ -125,7 +133,7 @@ release_to_sourceforge () {
>  # srv_path="~/public_html$srv_path"
>
>  # Check that the server path actually does exist
> -ssh $USER_NAME$hostname ls $srv_path >/dev/null 2>&1 ||
> +ssh $SF_USERNAME$hostname ls $srv_path >/dev/null 2>&1 ||
>  if [ $? -ne 0 ]; then
> echo "Error: the path \"$srv_path\" on the web server does not exist."
> cd $top_src
> @@ -134,7 +142,7 @@ release_to_sourceforge () {
>
>  # Check for already existing tarballs
>  for tarball in $targz $tarbz2 $tarxz; do
> -   ssh $USER_NAME$hostname ls $srv_path/$tarball  >/dev/null 2>&1
> +   ssh $SF_USERNAME$hostname ls $srv_path/$tarball  >/dev/null 2>&1
> if [ $? -eq 0 ]; then
> if [ "x$FORCE" = "xyes" ]; then
> echo "Warning: overwriting released tarballs due to --force 
> option."
> @@ -149,7 +157,7 @@ release_to_sourceforge () {
>  # Upload to host using the 'scp' remote file copy program
>  if [ x"$DRY_RUN" = x ]; then
> echo "Info: uploading tarballs to web server:"
> -   scp $targz $tarbz2 $tarxz $siggz $sigbz2 $sigxz 
> $USER_NAME$hostname:$srv_path
> +   scp $targz $tarbz2 $tarxz $siggz $sigbz2 $sigxz 
> $SF_USERNAME$hostname:$srv_path
> if [ $? -ne 0 ]; then
> echo "Error: the tarballs uploading failed."
> cd $top_src
> @@ -159,6 +167,13 @@ release_to_sourceforge () {
> echo "Info: skipping tarballs uploading in dry-run mode."
> echo "  \"$srv_path\"."
>  fi
> +
> +host_current="sourceforge.net"
> +section_path="projects/linuxwacom/files/$section"
> +# DL_URL & PGP_URL will be overwritten by the Github download url if 
> github was
> +# enabled on the command line
> +DL_URL="http://$host_current/$section_path/$tarbz2;
> +PGP_URL="http://$host_current/$section_path/$tarbz2.sig;
>  }
>
>  
> #--
> @@ -183,12 +198,13 @@ check_json_message() {
>  release_to_github() {
>  # Creating a release on Github automatically creates a tag.
>
> -#dependency 'jq' for reading the json github sends us back
> +# dependency 'jq' for reading the json github sends us back
>
> -#note git_username should include the suffix ":KEY" if the user has 
> enabled 2FA
> -#example skomra:de0e4dc3efbf2d008053027708227b365b7f80bf
> +# note git_username should include the suffix ":KEY" if the user has 
> enabled 2FA
> +# example skomra:de0e4dc3efbf2d008053027708227b365b7f80bf
>
> -GH_REPO=linuxwacom
> +

[Linuxwacom-devel] [input-wacom] release.sh: Synchronize with changes made to xf86-input-wacom's release.sh

2018-01-26 Thread Aaron Armstrong Skomra
Signed-off-by: Aaron Armstrong Skomra 
---
 release.sh | 88 ++
 1 file changed, 54 insertions(+), 34 deletions(-)

diff --git a/release.sh b/release.sh
index f8a484321fdd..3ca2f72d9378 100755
--- a/release.sh
+++ b/release.sh
@@ -15,6 +15,14 @@
 export LC_ALL=C
 
 #--
+#  Function: check_for_jq
+#--
+#
+check_for_jq() {
+command -v jq >/dev/null 2>&1 || { echo >&2 "This script requires jq but 
it is not installed. Exiting."; exit 1;}
+}
+
+#--
 #  Function: check_local_changes
 #--
 #
@@ -113,10 +121,10 @@ release_to_sourceforge () {
 section_path="projects/linuxwacom/files/$section"
 srv_path="/home/frs/project/linuxwacom/$section"
 
-echo "creating shell on sourceforge for $USER_NAME"
-ssh ${USER_NAME%@},linuxwacom@$hostname create
+echo "creating shell on sourceforge for $SF_USERNAME"
+ssh ${SF_USERNAME%@},linuxwacom@$hostname create
 #echo "Simply log out once you get to the prompt"
-#ssh -t ${USER_NAME%@},linuxwacom@$hostname create
+#ssh -t ${SF_USERNAME%@},linuxwacom@$hostname create
 #echo "Sleeping for 30 seconds, because this sometimes helps against 
sourceforge's random authentication denials"
 #sleep 30
 fi
@@ -125,7 +133,7 @@ release_to_sourceforge () {
 # srv_path="~/public_html$srv_path"
 
 # Check that the server path actually does exist
-ssh $USER_NAME$hostname ls $srv_path >/dev/null 2>&1 ||
+ssh $SF_USERNAME$hostname ls $srv_path >/dev/null 2>&1 ||
 if [ $? -ne 0 ]; then
echo "Error: the path \"$srv_path\" on the web server does not exist."
cd $top_src
@@ -134,7 +142,7 @@ release_to_sourceforge () {
 
 # Check for already existing tarballs
 for tarball in $targz $tarbz2 $tarxz; do
-   ssh $USER_NAME$hostname ls $srv_path/$tarball  >/dev/null 2>&1
+   ssh $SF_USERNAME$hostname ls $srv_path/$tarball  >/dev/null 2>&1
if [ $? -eq 0 ]; then
if [ "x$FORCE" = "xyes" ]; then
echo "Warning: overwriting released tarballs due to --force 
option."
@@ -149,7 +157,7 @@ release_to_sourceforge () {
 # Upload to host using the 'scp' remote file copy program
 if [ x"$DRY_RUN" = x ]; then
echo "Info: uploading tarballs to web server:"
-   scp $targz $tarbz2 $tarxz $siggz $sigbz2 $sigxz 
$USER_NAME$hostname:$srv_path
+   scp $targz $tarbz2 $tarxz $siggz $sigbz2 $sigxz 
$SF_USERNAME$hostname:$srv_path
if [ $? -ne 0 ]; then
echo "Error: the tarballs uploading failed."
cd $top_src
@@ -159,6 +167,13 @@ release_to_sourceforge () {
echo "Info: skipping tarballs uploading in dry-run mode."
echo "  \"$srv_path\"."
 fi
+
+host_current="sourceforge.net"
+section_path="projects/linuxwacom/files/$section"
+# DL_URL & PGP_URL will be overwritten by the Github download url if 
github was
+# enabled on the command line
+DL_URL="http://$host_current/$section_path/$tarbz2;
+PGP_URL="http://$host_current/$section_path/$tarbz2.sig;
 }
 
 #--
@@ -183,12 +198,13 @@ check_json_message() {
 release_to_github() {
 # Creating a release on Github automatically creates a tag.
 
-#dependency 'jq' for reading the json github sends us back
+# dependency 'jq' for reading the json github sends us back
 
-#note git_username should include the suffix ":KEY" if the user has 
enabled 2FA
-#example skomra:de0e4dc3efbf2d008053027708227b365b7f80bf
+# note git_username should include the suffix ":KEY" if the user has 
enabled 2FA
+# example skomra:de0e4dc3efbf2d008053027708227b365b7f80bf
 
-GH_REPO=linuxwacom
+GH_REPO="linuxwacom"
+PROJECT="input-wacom"
 release_description="Temporary Empty Release Description"
 release_descr=$(jq -n --arg release_description "$release_description" 
'$release_description')
 
@@ -199,7 +215,7 @@ release_to_github() {
 "body": %s,
 "draft": false,
 "prerelease": false}' "$tar_name" "$tar_name" 
"$release_descr")
-create_result=`curl -s --data "$api_json" -u $GH_USERNAME 
https://api.github.com/repos/$GH_REPO/input-wacom/releases`
+create_result=`curl -s --data "$api_json" -u $GH_USERNAME 
https://api.github.com/repos/$GH_REPO/$PROJECT/releases`
 GH_RELEASE_ID=`echo $create_result | jq '.id'`
 
 check_json_message "$create_result"
@@ -208,8 +224,8 @@ release_to_github() {
 upload_result=`curl -s -u