feat(bin): 增加了迁移到最新版本的脚本

Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
李东云
2023-12-14 16:28:59 +08:00
parent 97131d224c
commit 7d6dc7fe9f
4 changed files with 211 additions and 193 deletions

19
bin/hdk-migrate-core.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
# shellcheck disable=SC2039
LIB_HOME_DIR="$(pwd)/vendor/singularity/hdk-core"
LATEST_VERSION=$(cat "${LIB_HOME_DIR}/VERSION_TRACKER.txt")
echo -e '\033[44;34;5m=============================\033[0m'
echo ''
$(pwd)/vendor/bin/rector \
process \
--autoload-file=vendor/autoload.php \
--config="${LIB_HOME_DIR}/hyperf31_rector.php"
echo ''
echo -e '\033[44;34;5m=============================\033[0m'
echo -e '\033[;31;1m🎉Congratulations!\033[0m'
echo "Now you have been migrated to HDK-Core v${LATEST_VERSION}!"
echo ''