Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 20 lines (15 sloc) 0.447 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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"
Something went wrong with that request. Please try again.