mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #4746 from gilles-peskine-arm/bump-version-3.0
Fix release scripts for 3.0
This commit is contained in:
@ -24,6 +24,8 @@
|
|||||||
# [ -v | --verbose ] [ -h | --help ]
|
# [ -v | --verbose ] [ -h | --help ]
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
VERSION=""
|
VERSION=""
|
||||||
SOVERSION=""
|
SOVERSION=""
|
||||||
|
|
||||||
@ -79,6 +81,10 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ $VERBOSE ] && echo "Bumping VERSION in CMakeLists.txt"
|
||||||
|
sed -e "s/ VERSION [0-9.]\{1,\}/ VERSION $VERSION/g" < CMakeLists.txt > tmp
|
||||||
|
mv tmp CMakeLists.txt
|
||||||
|
|
||||||
[ $VERBOSE ] && echo "Bumping VERSION in library/CMakeLists.txt"
|
[ $VERBOSE ] && echo "Bumping VERSION in library/CMakeLists.txt"
|
||||||
sed -e "s/ VERSION [0-9.]\{1,\}/ VERSION $VERSION/g" < library/CMakeLists.txt > tmp
|
sed -e "s/ VERSION [0-9.]\{1,\}/ VERSION $VERSION/g" < library/CMakeLists.txt > tmp
|
||||||
mv tmp library/CMakeLists.txt
|
mv tmp library/CMakeLists.txt
|
||||||
@ -116,10 +122,10 @@ then
|
|||||||
mv tmp library/Makefile
|
mv tmp library/Makefile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ $VERBOSE ] && echo "Bumping VERSION in include/mbedtls/version.h"
|
[ $VERBOSE ] && echo "Bumping VERSION in include/mbedtls/build_info.h"
|
||||||
read MAJOR MINOR PATCH <<<$(IFS="."; echo $VERSION)
|
read MAJOR MINOR PATCH <<<$(IFS="."; echo $VERSION)
|
||||||
VERSION_NR="$( printf "0x%02X%02X%02X00" $MAJOR $MINOR $PATCH )"
|
VERSION_NR="$( printf "0x%02X%02X%02X00" $MAJOR $MINOR $PATCH )"
|
||||||
cat include/mbedtls/version.h | \
|
cat include/mbedtls/build_info.h | \
|
||||||
sed -e "s/_VERSION_MAJOR .\{1,\}/_VERSION_MAJOR $MAJOR/" | \
|
sed -e "s/_VERSION_MAJOR .\{1,\}/_VERSION_MAJOR $MAJOR/" | \
|
||||||
sed -e "s/_VERSION_MINOR .\{1,\}/_VERSION_MINOR $MINOR/" | \
|
sed -e "s/_VERSION_MINOR .\{1,\}/_VERSION_MINOR $MINOR/" | \
|
||||||
sed -e "s/_VERSION_PATCH .\{1,\}/_VERSION_PATCH $PATCH/" | \
|
sed -e "s/_VERSION_PATCH .\{1,\}/_VERSION_PATCH $PATCH/" | \
|
||||||
@ -127,7 +133,7 @@ cat include/mbedtls/version.h | \
|
|||||||
sed -e "s/_VERSION_STRING .\{1,\}/_VERSION_STRING \"$VERSION\"/" | \
|
sed -e "s/_VERSION_STRING .\{1,\}/_VERSION_STRING \"$VERSION\"/" | \
|
||||||
sed -e "s/_VERSION_STRING_FULL .\{1,\}/_VERSION_STRING_FULL \"mbed TLS $VERSION\"/" \
|
sed -e "s/_VERSION_STRING_FULL .\{1,\}/_VERSION_STRING_FULL \"mbed TLS $VERSION\"/" \
|
||||||
> tmp
|
> tmp
|
||||||
mv tmp include/mbedtls/version.h
|
mv tmp include/mbedtls/build_info.h
|
||||||
|
|
||||||
[ $VERBOSE ] && echo "Bumping version in tests/suites/test_suite_version.data"
|
[ $VERBOSE ] && echo "Bumping version in tests/suites/test_suite_version.data"
|
||||||
sed -e "s/version:\".\{1,\}/version:\"$VERSION\"/g" < tests/suites/test_suite_version.data > tmp
|
sed -e "s/version:\".\{1,\}/version:\"$VERSION\"/g" < tests/suites/test_suite_version.data > tmp
|
||||||
|
@ -23,12 +23,13 @@ set -eu
|
|||||||
|
|
||||||
if [ $# -ne 0 ] && [ "$1" = "--help" ]; then
|
if [ $# -ne 0 ] && [ "$1" = "--help" ]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
$0 [-u]
|
$0 [-l | -u]
|
||||||
This script checks that all generated file are up-to-date. If some aren't, by
|
This script checks that all generated file are up-to-date. If some aren't, by
|
||||||
default the scripts reports it and exits in error; with the -u option, it just
|
default the scripts reports it and exits in error; with the -u option, it just
|
||||||
updates them instead.
|
updates them instead.
|
||||||
|
|
||||||
-u Update the files rather than return an error for out-of-date files.
|
-u Update the files rather than return an error for out-of-date files.
|
||||||
|
-l List generated files, but do not update them.
|
||||||
EOF
|
EOF
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -39,10 +40,13 @@ if [ -d library -a -d include -a -d tests ]; then :; else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
UPDATE=
|
UPDATE=
|
||||||
if [ $# -ne 0 ] && [ "$1" = "-u" ]; then
|
LIST=
|
||||||
shift
|
while getopts lu OPTLET; do
|
||||||
UPDATE='y'
|
case $OPTLET in
|
||||||
fi
|
l) LIST=1;;
|
||||||
|
u) UPDATE=1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# check SCRIPT FILENAME[...]
|
# check SCRIPT FILENAME[...]
|
||||||
# check SCRIPT DIRECTORY
|
# check SCRIPT DIRECTORY
|
||||||
@ -58,6 +62,11 @@ check()
|
|||||||
SCRIPT=$1
|
SCRIPT=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
if [ -n "$LIST" ]; then
|
||||||
|
printf '%s\n' "$@"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
directory=
|
directory=
|
||||||
if [ -d "$1" ]; then
|
if [ -d "$1" ]; then
|
||||||
directory="$1"
|
directory="$1"
|
||||||
|
Reference in New Issue
Block a user