123456789101112131415161718192021222324252627 |
- #!/bin/sh
- basedir="$(realpath -e "$0" | xargs dirname)"
- srcdir="$basedir/.."
- die() { echo "$*"; exit 1; }
- # Import the makerelease.lib
- # https://bues.ch/cgit/misc.git/plain/makerelease.lib
- for path in $(echo "$PATH" | tr ':' ' '); do
- [ -f "$MAKERELEASE_LIB" ] && break
- MAKERELEASE_LIB="$path/makerelease.lib"
- done
- [ -f "$MAKERELEASE_LIB" ] && . "$MAKERELEASE_LIB" || die "makerelease.lib not found."
- hook_get_version()
- {
- local file="$1/partmgr/core/version.py"
- local maj="$(cat "$file" | grep -e VERSION_MAJOR | head -n1 | awk '{print $3;}')"
- local min="$(cat "$file" | grep -e VERSION_MINOR | head -n1 | awk '{print $3;}')"
- version="$maj.$min"
- }
- project=partmgr
- default_archives=py-sdist-xz
- makerelease "$@"
|