xref: /glogg/release-source.sh (revision 6e2e573c451ec24d720c967fab68538eaa3f3ab5)
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