public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [PATCH] Add contrib/upload-release.sh
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <20191002140736.GA12058@delia> (raw)

Hi,

Add a script contrib/upload-release.sh, that uploads dwz release tarballs to
sourceware.org, making them available at
https://sourceware.org/ftp/dwz/releases.

Tested using:
...
$ contrib/upload-release.sh 0.13
...
with ftpdir=/sourceware/ftp/pub/dwz/testing-1-2-3, resulting in:
...
$ ls -la
totaal 268
drwxr-sr-x. 2 vries dwz   4096 okt  2 13:51 .
drwsrwsr-x. 4 vries dwz   4096 okt  2 13:51 ..
-rw-r--r--. 1 vries dwz 143276 okt  2 13:51 dwz-0.13.tar.gz
-rw-r--r--. 1 vries dwz 114004 okt  2 13:51 dwz-0.13.tar.xz
-rw-r--r--. 1 vries dwz    100 okt  2 13:51 md5sum
-rw-r--r--. 1 vries dwz    292 okt  2 13:51 sha512sum
$ cat md5sum
00000000000000000000000000000000  dwz-0.13.tar.gz
00000000000000000000000000000000  dwz-0.13.tar.xz
$ cat sha512sum
00000000000000000000000000000000...00000000000000000000  dwz-0.13.tar.gz
00000000000000000000000000000000...00000000000000000000  dwz-0.13.tar.xz
...

OK for trunk?

Thanks,
- Tom

Add contrib/upload-release.sh

2019-10-02  Tom de Vries  <tdevries@suse.de>

	PR dwz/25052
	* contrib/upload-release.sh: New script.

---
 contrib/upload-release.sh | 64 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/contrib/upload-release.sh b/contrib/upload-release.sh
new file mode 100755
index 0000000..47c608e
--- /dev/null
+++ b/contrib/upload-release.sh
@@ -0,0 +1,64 @@
+#!/bin/sh -x
+
+set -e
+
+pwd=$(pwd -P)
+
+version="$1"
+
+tag=dwz-$version
+rootdir=dwz
+tarfile=dwz-$version.tar
+server=sourceware.org
+ftpdir=/sourceware/ftp/pub/dwz/releases
+checksums="md5sum sha512sum"
+
+repo="$pwd"
+
+dir=$(mktemp -d)
+
+cd $dir
+git clone \
+    $repo \
+    $rootdir
+
+cd $dir/$rootdir
+git ch $tag
+
+rm -Rf .git
+
+cd $dir
+tar cvf \
+    $tarfile \
+    $rootdir
+
+xz \
+    --best \
+    -k \
+    $tarfile
+
+gzip \
+    --best \
+    -k \
+    $tarfile
+
+files=$(echo $tarfile.*)
+
+[ "$files" != "" ]
+
+ssh $server \
+    "mkdir -p $ftpdir"
+
+scp \
+    $files \
+    "$server:$ftpdir"
+
+ssh $server \
+    "cd $ftpdir && chmod 644 $files"
+
+for checksum in $checksums; do
+    ssh $server \
+	"cd $ftpdir && touch $checksum && chmod 644 $checksum && ( $checksum $files >> $checksum )"
+done
+
+rm -Rf $dir

             reply	other threads:[~2019-10-02 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 Tom de Vries [this message]
2019-01-01  0:00 ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191002140736.GA12058@delia \
    --to=tdevries@suse.de \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).