mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-07-30 16:26:33 +08:00
.Revert "Removed prepare release"
This reverts commit 26e9ad6dd052883befbc57b47412e21e3050c5ca. Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
0c93bf8ecd
commit
42579c808e
37
scripts/prepare_release.sh
Executable file
37
scripts/prepare_release.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
# Copyright The Mbed TLS Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
|
||||
# prepare_release.sh — Prepare the source tree for a release.
|
||||
#
|
||||
# This script switches the repo into “release” mode:
|
||||
# - Updates all tracked `.gitignore` files to stop
|
||||
# ignoring the automatically-generated files.
|
||||
# - Sets the CMake option `GEN_FILES` to OFF to explicitely disable
|
||||
# recreating the automatically-generated files.
|
||||
#. - The script will recursively update the tf-psa-crypto files too.
|
||||
|
||||
|
||||
set -eu
|
||||
|
||||
# Portable inline sed. Helper function that will automatically pre-pend
|
||||
# an empty string as the backup suffix (required by macOS sed).
|
||||
psed() {
|
||||
# macOS sed does not offer a version
|
||||
if sed --version >/dev/null 2>&1; then
|
||||
sed -i "$@"
|
||||
# macOS/BSD sed
|
||||
else
|
||||
sed -i '' "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
#### .gitignore processing ####
|
||||
for GITIGNORE in $(git ls-files --recurse-submodules -- '*.gitignore'); do
|
||||
psed '/###START_GENERATED_FILES###/,/###END_GENERATED_FILES###/s/^/#/' "$GITIGNORE"
|
||||
psed 's/###START_GENERATED_FILES###/###START_COMMENTED_GENERATED_FILES###/' "$GITIGNORE"
|
||||
psed 's/###END_GENERATED_FILES###/###END_COMMENTED_GENERATED_FILES###/' "$GITIGNORE"
|
||||
done
|
||||
|
||||
#### Build system ####
|
||||
psed '/[Oo][Ff][Ff] in development/! s/^\( *option *( *GEN_FILES *"[^"]*" *\)\([A-Za-z0-9][A-Za-z0-9]*\)/\1OFF/' CMakeLists.txt tf-psa-crypto/CMakeLists.txt
|
||||
Loading…
x
Reference in New Issue
Block a user