Skip to content

Commit

Permalink
Merge pull request #5 from SpaceWarpDev/dev
Browse files Browse the repository at this point in the history
Version 1.8.0.5
  • Loading branch information
jan-bures authored Jan 28, 2024
2 parents 2f1e51a + 968f589 commit ad24676
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
16 changes: 11 additions & 5 deletions BuildPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,24 @@ Get-ChildItem -Path "$BuildFolderPath/templates" -Directory | ForEach-Object {
Copy-Item -Path "$SrcFolderPath/common/*" -Destination $_.FullName -Recurse -Force
}

$skipExtensions = @(".jpg", ".jpeg", ".png", ".gif", ".bmp")

Get-ChildItem -Path "$BuildFolderPath/templates" -Directory | ForEach-Object {
$currentTemplateName = $_.Name
$Replacements["SpaceWarpTemplateName"] = $currentTemplateName

Get-ChildItem -Path $_.FullName -Recurse -File | ForEach-Object {
$fileContent = Get-Content $_.FullName -Raw
if ($skipExtensions -contains $_.Extension) {
Write-Host "Skipped binary file ""$($_.Name)"""
} else {
$fileContent = Get-Content $_.FullName -Raw

foreach ($replacement in $Replacements.Keys) {
$fileContent = $fileContent -replace $replacement, $Replacements[$replacement]
}
foreach ($replacement in $Replacements.Keys) {
$fileContent = $fileContent -replace $replacement, $Replacements[$replacement]
}

Set-Content -Path $_.FullName -Value $fileContent
Set-Content -Path $_.FullName -Value $fileContent
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>SpaceWarp.Template</id>
<version>1.8.0.3</version>
<version>1.8.0.5</version>
<authors>munix</authors>
<title>SpaceWarp Mod Template</title>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"com.unity.feature.development": "1.0.1",
"uitkforksp2.controls": "https://github.com/UitkForKsp2/UitkForKsp2.Controls.git",
"uitkforksp2.controls": "https://github.com/UitkForKsp2/UitkForKsp2.Unity.git",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@
"url": "https://packages.unity.com"
},
"uitkforksp2.controls": {
"version": "https://github.com/UitkForKsp2/UitkForKsp2.Controls.git",
"version": "https://github.com/UitkForKsp2/UitkForKsp2.Unity.git",
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "fdc0ae58680234cda7786910e9dfa80c2de05530"
"hash": "182e6c631c63b37d7f1ac3b760b93bb859891436"
},
"com.unity.modules.ai": {
"version": "1.0.0",
Expand Down

0 comments on commit ad24676

Please sign in to comment.