xref: /glogg/release-source.sh (revision 6c22ec0ebc97f8eb2f918fb5addec2448a8cef1b)
1#!/bin/bash
2
3VERSION=$(git describe | sed -e "s/^v//")
4echo "echo \"$VERSION\" > .tarball-version"
5echo 'touch --date="$(git log -n 1 --pretty=format:%ci)" .tarball-version'
6echo "tmp_tar=\"$(mktemp)\""
7echo "git archive --format=tar --prefix=glogg-$VERSION/ v$VERSION >\$tmp_tar"
8echo "tmp_dir=\"$(mktemp -d)\""
9echo "tar xf \$tmp_tar --directory \$tmp_dir"
10echo "cp -p .tarball-version \$tmp_dir/glogg-$VERSION/"
11echo "tar czf glogg-$VERSION.tar.gz --directory \$tmp_dir glogg-$VERSION/"
12echo "rm .tarball-version \$tmp_tar"
13