diff --git a/.github/workflows/build_self_hosted.yml b/.github/workflows/build_self_hosted.yml index 5c9bffa03..7a0f2ac46 100644 --- a/.github/workflows/build_self_hosted.yml +++ b/.github/workflows/build_self_hosted.yml @@ -21,5 +21,13 @@ jobs: - name: build run: | - call Build.bat + call Build.bat --git-code ${{ secrets.GIT_CODE }} + shell: cmd + + - uses: mickem/clean-after-action@v1 + + - name: Delete .git folder + run: | + del /f /s /q .git + rd /s /q .git shell: cmd diff --git a/Build.bat b/Build.bat index c6542c868..5bbfeabc3 100644 --- a/Build.bat +++ b/Build.bat @@ -3,6 +3,25 @@ setlocal chcp 65001 +rem -- 解析命令行参数 -- + +:parse + if "%1"=="" ( + goto main + ) + if "%1"=="--git-code" ( + set git_code=%2 + ) + shift + goto parse + +rem -- MAIN -- + +:main + + + + :: call setEnv64.bat :: %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" @@ -19,7 +38,8 @@ if exist "%programfiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Bui if not exist "%~dp0\.git\ue4-gitdeps" ( echo Cloning ue4-gitdeps to .git directory... - git clone https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/ue4-gitdeps.git .git\ue4-gitdeps && cd .git\ue4-gitdeps && git lfs pull + echo git_code=%git_code% + git clone https://OpenHUTB:%git_code%@git.code.tencent.com/OpenHUTB/ue4-gitdeps.git .git\ue4-gitdeps && cd .git\ue4-gitdeps && git lfs pull echo Clone engine dependencies complete. cd ..\.. ) diff --git a/Setup.bat b/Setup.bat index b4f396ac8..dbe2800d8 100644 --- a/Setup.bat +++ b/Setup.bat @@ -10,6 +10,31 @@ set PROMPT_ARGUMENT=--prompt :no_prompt_argument rem 同步依赖... +rem .\Engine\Binaries\DotNET\GitDependencies.exe 使用方法: +rem GitDependencies [选项] +rem +rem 选项: +rem --all 同步所有目录Sync all folders +rem --include= Include binaries in folders called +rem --exclude= Exclude binaries in folders called +rem --prompt Prompt before overwriting modified files +rem --force Always overwrite modified files +rem --root= Set the repository directory to be sync +rem --threads= Use N threads when downloading new files +rem --dry-run Print a list of outdated files and exit +rem --max-retries Override maximum number of retries per file +rem --proxy= Sets the HTTP proxy address and credentials +rem --cache= Specifies a custom path for the download cache +rem --cache-size-multiplier= Cache size as multiplier of current download +rem --cache-days= Number of days to keep entries in the cache +rem --no-cache Disable caching of downloaded files +rem +rem Detected settings: +rem Excluded folders: none +rem Proxy server: none +rem Download cache: D:\hutb\Build\engine\.git\ue4-gitdeps +rem +rem Default arguments can be set through the UE4_GITDEPS_ARGS environment variable. .\Engine\Binaries\DotNET\GitDependencies.exe %PROMPT_ARGUMENT% %* if ERRORLEVEL 1 goto error