Update .gitlab-ci.yml
This commit is contained in:
parent
17fcfa524d
commit
f21315f0c0
@ -1,28 +1,32 @@
|
|||||||
.shared_windows_runners:
|
.shared_windows_runners:
|
||||||
tags:
|
tags:
|
||||||
- shared-windows
|
|
||||||
- windows
|
- windows
|
||||||
- windows-1809
|
|
||||||
|
|
||||||
image: mcr.microsoft.com/dotnet/core/sdk
|
image: mcr.microsoft.com/dotnet/core/sdk
|
||||||
|
|
||||||
before_script:
|
|
||||||
- dotnet restore
|
|
||||||
|
|
||||||
uptool:
|
uptool:
|
||||||
extends:
|
extends:
|
||||||
- .shared_windows_runners
|
- .shared_windows_runners
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script: |
|
script: |
|
||||||
$(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Tools.zip?job=uptool", "$($(pwd).Path)\Tools.zip")
|
mkdir i
|
||||||
& "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip
|
cd i
|
||||||
rm Tools.zip
|
$(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Installer-generic.zip?job=uptool", "$($(pwd).Path)\Install.zip")
|
||||||
rm Install.bat
|
& "C:\Program Files\7-Zip\7z.exe" x .\Install.zip
|
||||||
rm Remove.bat
|
.\Installer.exe i -p
|
||||||
|
cd ..
|
||||||
|
rm -R i
|
||||||
|
$Env:Path="$Env:Path;$Env:APPDATA\UpTool2\Install"
|
||||||
|
uptool --basic remove-repo "UpTool2 official Repo"
|
||||||
|
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"
|
||||||
|
|
||||||
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
|
||||||
|
Reference in New Issue
Block a user