Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include silent flag #46

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/scripts/windows/prepare-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ resolve_unity_serial() {
# License provided.
elif [ -n "$unity_encoded_license" ]; then
printf '%s\n' "No serial detected. Extracting it from the encoded license."

if ! extract_serial_from_license; then
printf '%s\n' "Failed to parse the serial from the Unity license."
printf '%s\n' "Please try again or open an issue."
printf '%s\n' "See the docs for more details: https://game.ci/docs/circleci/activation#personal-license"

exit_code=1

else
readonly resolved_unity_serial="$decoded_unity_serial"
fi
Expand Down Expand Up @@ -63,7 +63,7 @@ extract_serial_from_license() {
unity_license="$(base64 --decode <<< "$unity_encoded_license")"
developer_data="$(grep -oP '<DeveloperData Value\="\K.*?(?="/>)' <<< "$unity_license")"
encoded_serial="$(cut -c 5- <<< "$developer_data")"

decoded_unity_serial="$(base64 --decode <<< "$encoded_serial")"
readonly decoded_unity_serial

Expand Down Expand Up @@ -115,7 +115,7 @@ set +x

# Register the Windows SDK and VCC Tools.
docker exec "$container_name" powershell 'reg import C:\regkeys\winsdk.reg'
docker exec "$container_name" powershell 'regsvr32 C:\ProgramData\Microsoft\VisualStudio\Setup\x64\Microsoft.VisualStudio.Setup.Configuration.Native.dll'
docker exec "$container_name" powershell 'regsvr32 /s C:\ProgramData\Microsoft\VisualStudio\Setup\x64\Microsoft.VisualStudio.Setup.Configuration.Native.dll'

# Activate Unity
docker exec "$container_name" powershell '& "C:\Program Files\Unity\Hub\Editor\*\Editor\Unity.exe" -batchmode -quit -nographics -username $Env:UNITY_USERNAME -password $Env:UNITY_PASSWORD -serial $Env:UNITY_SERIAL -logfile | Out-Host'