Skip to content

Commit edf1c6e

Browse files
committed
Treat MiniSuperHealth As Dependency
noinstall file tells CI to not collect it for releases
1 parent 2177847 commit edf1c6e

7 files changed

Lines changed: 27 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,35 +51,39 @@ jobs:
5151
function Replace-PackageName-File {
5252
param(
5353
$File,
54-
$SubDir
54+
$SubDir,
55+
$OldSuffix,
56+
$NewSuffix
5557
)
5658
5759
$OldName = $File.Name
58-
$NewName = ($File.Name -replace "${{ github.event.repository.name }}\.","${{ env.PKG_NAME }}.")
60+
$NewName = ($File.Name -replace ("${{ github.event.repository.name }}"+$OldSuffix),"${{ env.PKG_NAME }}.")
5961
$NewItem = ("${{ env.PKG_NAME }}"+$SubDir+$NewName)
6062
Write-Output ($SubDir + $OldName + " -> " + $SubDir + $NewName)
6163
if (Test-Path -Path $NewItem) { Remove-Item $NewItem }
6264
(Get-Content -Path $File.FullName) | ForEach-Object {
63-
($_ -replace "${{ github.event.repository.name }}\.","${{ env.PKG_NAME }}.") >> $NewItem
65+
($_ -replace ("${{ github.event.repository.name }}"+$OldSuffix),("${{ env.PKG_NAME }}"+$NewSuffix)) >> $NewItem
6466
}
6567
Remove-Item $File
6668
}
6769
6870
function Replace-PackageName {
6971
param(
7072
[string]$SubDir,
71-
[string]$FilePattern
73+
[string]$FilePattern,
74+
[string]$OldSuffix,
75+
[string]$NewSuffix
7276
)
7377
if (Test-Path -Path ("UT2004/${{ env.PKG_NAME }}"+$SubDir+$FilePattern)) {
7478
Get-ChildItem ("${{ env.PKG_NAME }}"+$SubDir+$FilePattern) | ForEach-Object {
75-
Replace-PackageName-File $_ $SubDir
79+
Replace-PackageName-File $_ $SubDir $OldSuffix $NewSuffix
7680
}
7781
}
7882
}
7983
80-
Replace-PackageName "/System/" "${{ github.event.repository.name }}.*"
81-
Replace-PackageName "/USrc/" "${{ github.event.repository.name }}.upkg"
82-
Replace-PackageName "/Classes/" "*.cmds"
84+
Replace-PackageName "/System/" "${{ github.event.repository.name }}.*" "\." "."
85+
Replace-PackageName "/USrc/" "${{ github.event.repository.name }}.upkg" "\." "."
86+
Replace-PackageName "/Classes/" "*.cmds" "" ""
8387
8488
- name: Create VersionInfo.uc
8589
shell: cmd
@@ -98,15 +102,15 @@ jobs:
98102

99103
- name: Collect Release Files
100104
run: |
101-
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/System" -PathType Container) { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/System" -Destination "Release/System" -Recurse -Force -Verbose }
102-
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/Docs" -PathType Container) { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/Docs" -Destination "Release/Docs" -Recurse -Force -Verbose }
103-
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/Help" -PathType Container) { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/Help" -Destination "Release/Help" -Recurse -Force -Verbose }
104-
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/LICENSE") { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/LICENSE" -Destination "Release" -Verbose }
105+
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/System" -PathType Container) { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/System" -Destination "Release/System" -Recurse -Force -Verbose }
106+
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/Docs" -PathType Container) { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/Docs" -Destination "Release/Docs" -Recurse -Force -Verbose }
107+
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/Help" -PathType Container) { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/Help" -Destination "Release/Help" -Recurse -Force -Verbose }
108+
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/LICENSE") { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/LICENSE" -Destination "Release" -Verbose }
105109
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/README.md") { Copy-Item -Path "UT2004/${{ env.PKG_NAME }}/README.md" -Destination "Release" -Verbose }
106110
if (Test-Path -Path "UT2004/${{ env.PKG_NAME }}/Build/Dependencies" -PathType Container) {
107111
Get-ChildItem "UT2004/${{ env.PKG_NAME }}/Build/Dependencies" | ForEach-Object {
108112
$Dep = $_
109-
if (Test-Path $Dep -PathType Container) {
113+
if ((Test-Path $Dep -PathType Container) -and (-not (Test-Path -Path ($Dep.FullName+"/noinstall") -PathType Leaf))) {
110114
Get-ChildItem $Dep | ForEach-Object {
111115
Copy-Item $_ -Destination "Release" -Recurse -Force -Verbose
112116
}
Binary file not shown.
1.09 KB
Binary file not shown.

Build/Dependencies/MiniSuperHealth/noinstall

Whitespace-only changes.

BuildSettings.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
:: Example:
66
:: set DEPENDENCIES=MyDependency MyOtherDependency MyThirdDependency
77
::
8-
set DEPENDENCIES=
8+
set DEPENDENCIES=MiniSuperHealth
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
OBJ LOAD FILE=StaticMeshes/MiniSuperHealth.usx PACKAGE=UTComp
21
OBJ LOAD FILE=Textures/minimegatex.utx PACKAGE=UTComp
2+
OBJ LOAD FILE=StaticMeshes/MiniSuperHealth.usx PACKAGE=UTComp
33
POKE StaticMesh UTComp.MiniSuperHealth Materials ((EnableCollision=True,Material=FinalBlend'UTComp.MiniMegaTex'),(EnableCollision=False,Material=Shader'XGameShaders.Trans.TransRing'),(EnableCollision=False,Material=Shader'XGameShaders.Trans.TransRing'))

build.bat

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,12 @@ pushd "%BUILD_DIR%..\System"
142142

143143
set MAKEINI="%BUILD_TEMP%make.ini"
144144
set MAKELOG="%BUILD_TEMP%make.log"
145-
call :GenerateMakeIni %MAKEINI% %DEPENDENCIES% %PACKAGE_NAME%
145+
146+
set EDITPACKAGES=
146147
call :PrepareDependencies %DEPENDENCIES%
148+
if %VERBOSE% GEQ 1 echo EDITPACKAGES=!EDITPACKAGES!
149+
150+
call :GenerateMakeIni %MAKEINI% !EDITPACKAGES! %PACKAGE_NAME%
147151
call :PrepareUnrealscriptSource
148152
if ERRORLEVEL 1 goto compile_failed
149153

@@ -326,6 +330,9 @@ exit /B %ERRORLEVEL%
326330
) else (
327331
robocopy "%BUILD_DIR%Build/Dependencies/%1/" .. *.* /S >NUL
328332
)
333+
if exist "%BUILD_DIR%Build/Dependencies/%1/System/%1.u" (
334+
set EDITPACKAGES=!EDITPACKAGES! %1
335+
)
329336
) else (
330337
echo "Could not locate dependency '%1' in '%BUILD_DIR%Build/Dependencies/'"
331338
)

0 commit comments

Comments
 (0)