diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:21:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:21:43 +0000 |
commit | c8c3bd06ef1a7248c8195d050d8a4075d051256e (patch) | |
tree | 419655deec1b0af0c5d3ec488693f1494fb20959 /make_release | |
parent | Initial commit. (diff) | |
download | iperf3-c8c3bd06ef1a7248c8195d050d8a4075d051256e.tar.xz iperf3-c8c3bd06ef1a7248c8195d050d8a4075d051256e.zip |
Adding upstream version 3.16.upstream/3.16
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'make_release')
-rwxr-xr-x | make_release | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/make_release b/make_release new file mode 100755 index 0000000..54c43f0 --- /dev/null +++ b/make_release @@ -0,0 +1,69 @@ +#!/bin/sh + +proj="iperf" + +if [ "x$2" != "x" ]; then +tag=$2 +else +tag=`awk '/IPERF_VERSION / { + gsub(/"/, "", $3); + print $3 }' src/version.h` +fi + +dirname=`echo "$tag $proj" | awk '{ + gsub(/-ALPHA/, "a", $1); + gsub(/-BETA/, "b", $1); + gsub(/-RELEASE/, "", $1); + print $2"-"$1 }'` + +echo tag $tag +echo dirname $dirname + +do_tag () +{ + git tag -s -m "tagging $tag" "$tag" +} + +do_tar () +{ + tarball=${dirname}.tar.gz + rm -f "${tarball}" + git archive --format=tar --prefix "${dirname}/" "${tag}" | gzip -9 > "${tarball}" + + # Compute SHA256 hash + case `uname -s` in + FreeBSD) sha=sha256 ;; + Linux) sha=sha256sum ;; + Darwin) sha="shasum -a 256" ;; + *) sha=echo ;; + esac + ${sha} "${tarball}" | tee "${tarball}.sha256" +} + +usage () +{ + cat <<EOF +$0: tag|tar + + tag -- create a tag + tar -- create a tarball from a tag + +General use is to do: + +./$0 tag +./$0 tar + +An optional argument may be specified to both the tag and tar +subcommands to explicitly specify a tag string. If not specified, the +contents of src/version.h are used. + +EOF +} + +case $1 in + tag) do_tag ;; + tar) do_tar ;; + *) echo "unknown command: $1"; usage ;; +esac + +exit |