2020-06-18 16:55:00 +02:00
|
|
|
.shared_windows_runners:
|
|
|
|
tags:
|
|
|
|
- shared-windows
|
|
|
|
- windows
|
|
|
|
- windows-1809
|
|
|
|
|
|
|
|
image: mcr.microsoft.com/dotnet/core/sdk
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- dotnet restore
|
|
|
|
|
|
|
|
uptool:
|
|
|
|
extends:
|
|
|
|
- .shared_windows_runners
|
|
|
|
stage: deploy
|
|
|
|
script: |
|
2020-07-31 15:35:00 +02:00
|
|
|
$(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Tools.zip?job=uptool", "$($(pwd).Path)\Tools.zip")
|
2020-06-18 16:55:00 +02:00
|
|
|
& "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 = "Resize Windows with style"
|
|
|
|
$app.appendChild($xml.CreateElement("Version")).InnerText = $asmver
|
|
|
|
$app.appendChild($xml.CreateElement("ID")).InnerText = "e09cfca6-b6f7-4c56-96c4-d7cc2a318984"
|
|
|
|
$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
|
2020-06-21 08:21:33 +02:00
|
|
|
$app.appendChild($xml.CreateElement("Icon")).InnerText = "https://gitlab.com/JFronny/Resizor/-/raw/master/Resizor/Resizor.ico"
|
2020-06-18 16:55:00 +02:00
|
|
|
echo NULL > app.xml
|
|
|
|
$xml.save($(gi .\app.xml).Fullname)
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- package.zip
|
|
|
|
- app.xml
|
|
|
|
only:
|
|
|
|
- master
|