Files
kernel-zhihe-a210/.cicd/version.sh
2025-09-29 11:57:42 +08:00

19 lines
400 B
Bash
Executable File

#!/bin/sh
BRANCH=${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME}
if [ -n "${BRANCH}" ]; then
case "$BRANCH" in
develop|master) zb version _/_ ;;
*) zbuild version $BRANCH ;;
esac
else
zb version _/_
fi
zbuild build zbuild -f || true
# 删除一天前的遗留目录
find $CI_BUILDS_DIR -maxdepth 1 -type d -name "[0-9]*" -mtime +1 -exec rm -r {} \; || true