78 lines
3.6 KiB
YAML
78 lines
3.6 KiB
YAML
.shared_windows_runners:
|
|
tags:
|
|
- shared-windows
|
|
- windows
|
|
- windows-1809
|
|
|
|
before_script:
|
|
- dotnet restore
|
|
|
|
uptool:
|
|
extends:
|
|
- .shared_windows_runners
|
|
stage: deploy
|
|
script: |
|
|
choco install youtube-dl ffmpeg -y --nocolor --no-progress
|
|
refreshenv
|
|
$env:Path=(
|
|
[System.Environment]::GetEnvironmentVariable("Path","Machine"),
|
|
[System.Environment]::GetEnvironmentVariable("Path","User")
|
|
) -match '.' -join ';'
|
|
#python DownloadDataDepsInstall.py
|
|
#ffmpeg --help
|
|
#python DownloadData.py
|
|
#Quick hack reimplementing DownloadData because it apparently doesn't want to work
|
|
cd testexetrisathlon
|
|
youtube-dl -x --no-playlist --audio-format mp3 -o Intro.mp3 https://youtu.be/U06jlgpMtQs
|
|
youtube-dl -x --no-playlist --audio-format wav -o st1.wav https://youtu.be/hueJrl83sOQ
|
|
youtube-dl -x --no-playlist --audio-format wav -o st2.wav https://youtu.be/7gSS4h47rLU
|
|
youtube-dl -x --no-playlist --audio-format wav -o st3.wav https://youtu.be/NDjDgvXlfVw
|
|
ffmpeg -i st1.wav -i st2.wav -i st3.wav -filter_complex '[0:0][1:0][2:0][3:0]concat=n=4:v=0:a=1[out]' -map '[out]' InGame1.wav
|
|
ffmpeg -y -i InGame1.wav InGame1.mp3
|
|
rm st1.wav
|
|
rm st2.wav
|
|
rm st3.wav
|
|
rm InGame1.wav
|
|
youtube-dl -x --no-playlist --audio-format wav -o st1.wav https://youtu.be/umEDct4BoGc
|
|
youtube-dl -x --no-playlist --audio-format wav -o st2.wav https://youtu.be/NVpjt9gHlDw
|
|
youtube-dl -x --no-playlist --audio-format wav -o st3.wav https://youtu.be/zgKazTrhXmI
|
|
ffmpeg -i st1.wav -i st2.wav -i st3.wav -filter_complex '[0:0][1:0][2:0][3:0]concat=n=4:v=0:a=1[out]' -map '[out]' InGame2.wav
|
|
ffmpeg -y -i InGame2.wav InGame2.mp3
|
|
rm st1.wav
|
|
rm st2.wav
|
|
rm st3.wav
|
|
rm InGame2.wav
|
|
youtube-dl -x --no-playlist --audio-format mp3 -o GameOver.mp3 https://youtu.be/J_3Zad-e9f4
|
|
cd ..
|
|
#Nothing special after here
|
|
$(new-object System.Net.WebClient).DownloadFile("https://www.github.com/JFronny/UpTool2/releases/latest/download/Tools.zip", "$($(pwd).Path)\Tools.zip")
|
|
& "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip
|
|
rm Tools.zip
|
|
rm Install.bat
|
|
rm Remove.bat
|
|
mkdir .\build
|
|
dotnet publish -o .\build -c Release
|
|
$file = Get-Item $(Resolve-Path .\build\*.exe).Path
|
|
.\Data\pkgtool.exe build --binDir build --mainBin $file --packageFile .\package.zip --noLogo
|
|
$asm = $([Reflection.Assembly]::LoadFile($file.DirectoryName + "\" + $file.BaseName + ".dll"))
|
|
$asmver = $asm.GetName().Version.ToString()
|
|
[System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument
|
|
[System.XML.XMLElement]$app=$xml.CreateElement("app")
|
|
$xml.appendChild($app)
|
|
$app.appendChild($xml.CreateElement("Name")).InnerText = $asm.GetName().Name
|
|
$app.appendChild($xml.CreateElement("Description")).InnerText = "A simple Snake clone that runs in the terminal. Supports color and Benchmarking"
|
|
$app.appendChild($xml.CreateElement("Version")).InnerText = $asmver
|
|
$app.appendChild($xml.CreateElement("ID")).InnerText = "51dd476c-de2f-40c6-a587-0af62f1dbebb"
|
|
$app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/package.zip"
|
|
$app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\package.zip).Hash
|
|
$app.appendChild($xml.CreateElement("MainFile")).InnerText = $file.Name
|
|
$app.appendChild($xml.CreateElement("Icon")).InnerText = "https://raw.githubusercontent.com/JFronny/testexetrisathlon/master/testexetrisathlon/tetris_yUxH6t_256px.ico"
|
|
echo NULL > app.xml
|
|
$xml.save($(gi .\app.xml).Fullname)
|
|
artifacts:
|
|
paths:
|
|
- package.zip
|
|
- app.xml
|
|
only:
|
|
- master
|