Files
CC-Framework.EditorExtend/Update Upm.bat
2025-02-11 17:16:12 +08:00

35 lines
769 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
chcp 65001
setlocal enabledelayedexpansion
color a
echo 开始提交到git upm....
echo 提交upm前请确保当前分支所有改动都已经提交
rem 读取package.json中的版本号
for /f "tokens=2 delims=:, " %%a in ('type Assets\CCTools\package.json ^| findstr "version"') do (
set var=%%a
set var=!var:"=!
)
echo 当前package.json版本号为!var!
set /p Flg=确认提交的版本号!var!,是否开始提交(y/n) -------- :
IF "!Flg!" equ "y" (
echo 开始提交,请勿关闭该窗口!
git subtree split --prefix=Assets/CCTools --branch upm
git tag !var! upm
git push origin upm --tags
# 登录到npm
# npm login
# 发布到npm
# npm publish Assets/CCTools/
GOTO :END
)
GOTO :END
:END
echo 执行完毕!
pause
exit