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