mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-12-23 11:03:21 +02:00
78f38d48bf
It is probably worth spending the time to split them up with multiple upstream tarballs, but for now, usbboot, xbboot, and so on are in a single repository managed as a single project. Teach debian/rules get-orig-source to build a single upstream tarball with the entire source tree. Include history of whole tree in the generated changelog.upstream. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
31 lines
767 B
Bash
31 lines
767 B
Bash
#!/bin/sh
|
|
# Build a tarball from the latest upstream version, with a nice
|
|
# version number.
|
|
#
|
|
# Requires git 1.6.6 or later, GNU date, and gzip.
|
|
|
|
set -e
|
|
|
|
: ${REPO=$(git rev-parse --git-dir)}
|
|
: ${BRANCH=remotes/origin/master}
|
|
|
|
mkdir debian-orig-source
|
|
trap 'rm -fr debian-orig-source || exit 1' EXIT
|
|
|
|
git init -q debian-orig-source
|
|
GIT_DIR=$(pwd)/debian-orig-source/.git
|
|
export GIT_DIR
|
|
|
|
# Fetch latest upstream version.
|
|
git fetch -q "$REPO" "$BRANCH"
|
|
|
|
# Determine version number.
|
|
release=0.0
|
|
date=$(date --utc --date="$(git log -1 --pretty=format:%cD FETCH_HEAD)" "+%Y%m")
|
|
upstream_version="${release}+${date}"
|
|
|
|
# Generate tarball.
|
|
echo "packaging $(git rev-parse --short FETCH_HEAD)"
|
|
git archive FETCH_HEAD |
|
|
gzip -n -9 >"xburst-tools_$upstream_version.orig.tar.gz"
|