Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 14 lines (13 sloc) 385 Bytes
#!/bin/sh
set -e
NAME=osc-source_validator
VERSION=0.1
datefmt="%Y.%m.%d.%H%M"
LAST_COMMIT=(`git rev-list --timestamp HEAD^..HEAD`)
DATE=`date +$datefmt -d "1970-01-01 00:00 UTC $LAST_COMMIT seconds"`
#scmver="$DATE"
fullver="$VERSION${scmver:+_}$scmver"
pfx="$NAME${fullver:+-$fullver}"
fn="$pfx".tar.bz2
git archive --prefix="$pfx"/ HEAD | bzip2 > $fn
echo "version $fullver -> $fn"