Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bit/git_make_dist.sh: release tarballs out of git tags

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
commit 2ad1f9b3fd774b66d09ec968e759055b039882d7 1 parent 0b9dc02
@trofi authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 bin/git_make_dist.sh
View
20 bin/git_make_dist.sh
@@ -0,0 +1,20 @@
+#!/bin/bash -e
+
+if [[ -z $1 ]]; then
+ echo "usage: $0 <tag-name>"
+ exit 1
+fi
+
+d=$(pwd)
+project=$(basename "$d")
+project=${project%.git}
+
+tag=$1
+version=$tag
+version=${version#$project} # strip project name
+version=${version#v} # strip 'v' from "v1.2.3"
+
+tarball_name=$project-$version.tar.gz
+echo "building '${tarball_name}' out of tag '${tag}'"
+
+git archive --format=tar "$tag" --prefix="$project-$version/" | gzip > "$tarball_name"
Please sign in to comment.
Something went wrong with that request. Please try again.