Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7e1ed51

Browse files
Update main.yml #GITBUILD
here we go again .jpg
1 parent 4756b66 commit 7e1ed51

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

‎.github/workflows/main.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,33 @@ jobs:
9999
shell: pwsh
100100
run: |
101101
$proj = 'UnityLauncherProInstaller\UnityLauncherProInstaller.vdproj'
102-
$ver = "${{ env.INSTALLER_VER }}"
103-
$guid = [guid]::NewGuid().ToString("B").ToUpper()
102+
$ver = '${{ env.INSTALLER_VER }}' # e.g. "0.0.117"
103+
$guid = [Guid]::NewGuid().ToString("B").ToUpper() # e.g. "{1D05663F-...}"
104104
105-
(Get-Content $proj) |
106-
ForEach-Object {
107-
$_ -replace '("ProductVersion"\s*=\s*"8:)[^"]+"', "`1ドル$ver`"" `
108-
-replace '("ProductCode"\s*=\s*"8:)\{[^}]+\}"', "`1ドル{$guid}`""
109-
} |
110-
Set-Content $proj
105+
# Load entire file
106+
$content = Get-Content $proj -Raw
107+
108+
# Build the literal replacement strings
109+
$replacementVer = '1ドル' + $ver + '"' # yields: 1ドル<version>"
110+
$replacementCode = '1ドル{' + $guid + '}' # yields: 1ドル{<GUID>}
111+
112+
# Do the replacements
113+
$content = [regex]::Replace(
114+
$content,
115+
'("ProductVersion"\s*=\s*"8:)[^"]+"',
116+
$replacementVer
117+
)
118+
$content = [regex]::Replace(
119+
$content,
120+
'("ProductCode"\s*=\s*"8:)\{[^}]+\}"',
121+
$replacementCode
122+
)
123+
124+
# Overwrite the file
125+
Set-Content -Path $proj -Value $content
111126
112127
Write-Host "→ ProductVersion patched to $ver"
113-
Write-Host "→ ProductCode patched to $guid"
128+
Write-Host "→ ProductCode patched to $guid"
114129
115130
# 3) **DEBUG**: print out the patched .vdproj so you can inspect it
116131
- name: Show patched .vdproj

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /