[go: up one dir, main page]

File: release.sh

package info (click to toggle)
libgxps 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 920 kB
  • sloc: ansic: 10,868; xml: 999; sh: 18; makefile: 15
file content (26 lines) | stat: -rwxr-xr-x 821 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

NAME="$1"
VERSION="$2"

test -n "${MESON_SOURCE_ROOT}" || exit 1
test -n "${MESON_BUILD_ROOT}" || exit 1
test -n "${NAME}" || exit 1
test -n "${VERSION}" || exit 1

cd "${MESON_SOURCE_ROOT}"

echo "Removing old archive…"
rm -f "${NAME}-${VERSION}.tar"
rm -f "${NAME}-${VERSION}.tar.xz"

echo "Creating git archive…"
git archive --prefix="${NAME}-${VERSION}/" --format=tar HEAD -o ${NAME}-${VERSION}.tar

echo "Adding documentation to archive…"
BUILD_DIR=$(realpath --relative-to=${MESON_SOURCE_ROOT} ${MESON_BUILD_ROOT})
tar --transform "s|${BUILD_DIR}|${NAME}-${VERSION}|" -uf ${NAME}-${VERSION}.tar ${BUILD_DIR}/docs/reference/html
tar --transform "s|${BUILD_DIR}|${NAME}-${VERSION}|" -uf ${NAME}-${VERSION}.tar ${BUILD_DIR}/docs/tools/*.1

echo "Compressing archive…"
xz -f "${NAME}-${VERSION}.tar"