c779f2b380
This commit does the following: * Merge the changelog from the releases of 3.2 * Adds a command 'koha-upgrade-to-3.4' that does the MARC item splitting stuff. * Adds a debconf note to make sure people know that they need to run the above command. * Fixes the inclusion of jQuery in the packages. * Makes build-git-snapshot build packages with a 3.5 version. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
64 lines
1.1 KiB
Bash
Executable file
64 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# This script will build a .deb from a git snapshot of koha.
|
|
# Don't use it for building actual versions for uploading to Debian.
|
|
#
|
|
# To use:
|
|
# - commit any changes into git
|
|
# - run this script
|
|
|
|
set -e
|
|
|
|
die()
|
|
{
|
|
echo "$@"
|
|
exit 1
|
|
}
|
|
|
|
everything_is_commited()
|
|
{
|
|
if git status --short | grep -q '^'
|
|
then
|
|
return 1
|
|
else
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
latest_sha1() {
|
|
git rev-parse --short=8 HEAD
|
|
}
|
|
|
|
newversion() {
|
|
printf '3.5-1~git%s.%s' $(date +%Y%m%d%H%M%S) $(latest_sha1)
|
|
}
|
|
|
|
adjust_debian_changelog() {
|
|
dch --force-distribution -D squeeze-dev -v "$1" \
|
|
"Building git snapshot."
|
|
dch -r "Building git snapshot."
|
|
}
|
|
|
|
reset_debian_changelog() {
|
|
git checkout -- debian/changelog
|
|
}
|
|
|
|
build_package() {
|
|
git archive --format=tar --prefix="koha-$1/" HEAD |
|
|
gzip -9 > "../koha_$1.tar.gz"
|
|
pdebuild $2
|
|
}
|
|
|
|
if ! everything_is_commited
|
|
then
|
|
die "cannot build: uncommited changes"
|
|
fi
|
|
|
|
version="$(newversion)"
|
|
if [ -n "$1" ]
|
|
then
|
|
pdebuildopts="--buildresult $1"
|
|
fi
|
|
adjust_debian_changelog "$version"
|
|
build_package "$version" "$pdebuildopts"
|
|
reset_debian_changelog
|