Update .gitlab-ci.yml

This commit is contained in:
J. Fronny 2020-08-31 19:26:14 +00:00
parent 85bed21599
commit d327bfb93f
1 changed files with 14 additions and 11 deletions

View File

@ -1,17 +1,25 @@
.shared_windows_runners: .shared_windows_runners:
tags: tags:
- shared-windows
- windows - windows
- windows-1809
before_script:
- dotnet restore
uptool: uptool:
extends: extends:
- .shared_windows_runners - .shared_windows_runners
stage: deploy stage: deploy
script: | script: |
mkdir i
cd i
$(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Installer-generic.zip?job=uptool", "$($(pwd).Path)\Install.zip")
& "C:\Program Files\7-Zip\7z.exe" x .\Install.zip
.\Installer.exe --basic i -p
cd ..
rm -R i
$Env:Path="$Env:Path;$Env:APPDATA\UpTool2\Install"
uptool --basic add-repo DevTools https://gitlab.com/JFronny/UpTool2/-/snippets/2010392/raw
uptool --basic update
uptool --basic install "UpTool2 package tools"
$Env:Path="$Env:Path;$Env:APPDATA\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app"
#choco install youtube-dl ffmpeg -y --nocolor --no-progress #choco install youtube-dl ffmpeg -y --nocolor --no-progress
#refreshenv #refreshenv
#$env:Path=( #$env:Path=(
@ -19,15 +27,10 @@ uptool:
# [System.Environment]::GetEnvironmentVariable("Path","User") # [System.Environment]::GetEnvironmentVariable("Path","User")
#) -match '.' -join ';' #) -match '.' -join ';'
#My python script to auto-generate requirements would be here but arm64 sux #My python script to auto-generate requirements would be here but arm64 sux
$(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Tools.zip?job=uptool", "$($(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 mkdir .\build
dotnet publish -o .\build -c Release dotnet publish -o .\build -c Release
$file = Get-Item $(Resolve-Path .\build\*.exe).Path $file = Get-Item $(Resolve-Path .\build\*.exe).Path
.\Data\pkgtool.exe build --binDir build --mainBin $file --packageFile .\package.zip --noLogo pkgtool build --binDir build --mainBin $file --packageFile .\package.zip --noLogo
$asm = $([Reflection.Assembly]::LoadFile($file.DirectoryName + "\" + $file.BaseName + ".dll")) $asm = $([Reflection.Assembly]::LoadFile($file.DirectoryName + "\" + $file.BaseName + ".dll"))
$asmver = $asm.GetName().Version.ToString() $asmver = $asm.GetName().Version.ToString()
[System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument [System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument