1 Star 1 Fork 0

bellstudio/CMSIS-NN

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gen_pack.sh 2.52 KB
一键复制 编辑 原始数据 按行查看 历史
Vladimir Marchenko 提交于 2024-01-11 16:24 +08:00 . Updated pack and doc build flows (#93)
#!/usr/bin/env bash
# Version: 3.0
# Date: 2024-01-09
# This bash script generates a CMSIS-NN Software Pack:
#
set -o pipefail
# Set version of gen pack library
# For available versions see https://github.com/Open-CMSIS-Pack/gen-pack/tags.
# Use the tag name without the prefix "v", e.g., 0.7.0
REQUIRED_GEN_PACK_LIB="0.9.1"
# Set default command line arguments
DEFAULT_ARGS=(-c "v")
# Pack warehouse directory - destination
# Default: ./output
#
# PACK_OUTPUT=./output
# Temporary pack build directory,
# Default: ./build
#
# PACK_BUILD=./build
# Specify directory names to be added to pack base directory
# An empty list defaults to all folders next to this script.
# Default: empty (all folders)
#
PACK_DIRS="
Documentation
Include
Source
"
# Specify file names to be added to pack base directory
# Default: empty
#
PACK_BASE_FILES="
LICENSE
README.md
"
# Specify file names to be deleted from pack build directory
# Default: empty
#
PACK_DELETE_FILES="
Documentation/Doxygen
Documentation/README.md
"
# Specify patches to be applied
# Default: empty
#
# PACK_PATCH_FILES=""
# Specify addition argument to packchk
# Default: empty
#
# PACKCHK_ARGS=()
# Specify additional dependencies for packchk
# Default: empty
#
PACKCHK_DEPS="
ARM.CMSIS.pdsc
"
# Optional: restrict fallback modes for changelog generation
# Default: full
# Values:
# - full Tag annotations, release descriptions, or commit messages (in order)
# - release Tag annotations, or release descriptions (in order)
# - tag Tag annotations only
#
PACK_CHANGELOG_MODE="tag"
# custom pre-processing steps
#
# usage: preprocess <build>
# <build> The build folder
#
function preprocess() {
# add custom steps here to be executed
# before populating the pack build folder
./Documentation/Doxygen/gen_doc.sh
return 0
}
# custom post-processing steps
#
# usage: postprocess <build>
# <build> The build folder
#
function postprocess() {
# Set component version to match pack version
VERSION=$(git_describe "${CHANGELOG}" | sed -e "s/+g.*$//")
sed -i -e "s/Cgroup=\"NN Lib\" Cversion=\"[^\"]*\"/Cgroup=\"NN Lib\" Cversion=\"${VERSION}\"/" ${PACK_BUILD}/ARM.CMSIS-NN.pdsc
}
############ DO NOT EDIT BELOW ###########
# Set GEN_PACK_LIB_PATH to use a specific gen-pack library root
# ... instead of bootstrap based on REQUIRED_GEN_PACK_LIB
if [[ -f "${GEN_PACK_LIB_PATH}/gen-pack" ]]; then
. "${GEN_PACK_LIB}/gen-pack"
else
. <(curl -sL "https://raw.githubusercontent.com/Open-CMSIS-Pack/gen-pack/main/bootstrap")
fi
gen_pack "${DEFAULT_ARGS[@]}" "$@"
exit 0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bellstudio/CMSIS-NN.git
git@gitee.com:bellstudio/CMSIS-NN.git
bellstudio
CMSIS-NN
CMSIS-NN
main

搜索帮助