mirror of
https://github.com/openharmony/third_party_fsverity-utils.git
synced 2026-07-01 10:05:35 -04:00
f81f77709a
Other library users might need it. Signed-off-by: Eric Biggers <ebiggers@google.com>
33 lines
806 B
Bash
Executable File
33 lines
806 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
set -e -u -o pipefail
|
|
|
|
if [ $# != 1 ]; then
|
|
echo "Usage: $0 VERS" 1>&2
|
|
echo " e.g. $0 1.0" 1>&2
|
|
exit 2
|
|
fi
|
|
|
|
VERS=$1
|
|
PKG=fsverity-utils-$VERS
|
|
|
|
major=$(echo "$VERS" | cut -d. -f1)
|
|
minor=$(echo "$VERS" | cut -d. -f2)
|
|
sed -E -i -e "/FSVERITY_UTILS_MAJOR_VERSION/s/[0-9]+/$major/" \
|
|
-e "/FSVERITY_UTILS_MINOR_VERSION/s/[0-9]+/$minor/" \
|
|
common/libfsverity.h
|
|
git commit -a --signoff --message="v$VERS"
|
|
git tag --sign "v$VERS" --message="$PKG"
|
|
|
|
git archive "v$VERS" --prefix="$PKG/" > "$PKG.tar"
|
|
rm -rf "$PKG"
|
|
tar xf "$PKG.tar"
|
|
( cd "$PKG" && make all )
|
|
rm -r "$PKG"
|
|
|
|
gpg --detach-sign --armor "$PKG.tar"
|
|
DESTDIR=/pub/linux/kernel/people/ebiggers/fsverity-utils/v$VERS
|
|
kup mkdir "$DESTDIR"
|
|
kup put "$PKG.tar" "$PKG.tar.asc" "$DESTDIR/$PKG.tar.gz"
|