rssguard/resources/scripts/.appveyor-install-win.ps1

46 lines
1.9 KiB
PowerShell
Raw Normal View History

2017-10-24 08:30:12 +02:00
ls
2017-10-24 09:19:38 +02:00
$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
chcp 65001
$OutputEncoding
2017-10-24 08:30:12 +02:00
git clone -q --depth=1 https://github.com/martinrotter/rssguard.wiki.git C:\rssguard-wiki
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
git config --global user.email "rotter.martinos@gmail.com"
git config --global user.name "martinrotter"
2017-10-24 09:19:38 +02:00
$git_revision = git rev-parse --short HEAD
$date = (Get-Date).ToUniversalTime().ToString("MM-dd-yyyy HH:mm:ss UTC")
$wikifile = 'C:\rssguard-wiki\Development-builds.md'
2017-10-24 10:43:48 +02:00
2017-10-24 08:30:12 +02:00
$file = (Get-ChildItem '*.7z').Name
echo "File to upload: $file"
$url = curl.exe --upload-file "$file" "https://transfer.sh/$file" --silent
echo "Obtained URL: $url"
2017-10-24 08:48:04 +02:00
2017-10-24 10:43:48 +02:00
$webengine_type = if ($file -like '*nowebengine*') { echo "false" } else { echo "true" }
$regex = "\| Windows \|.+transfer\.sh \(7z\).+ $webengine_type \| "
$wikiline = "| Windows | $date | [$git_revision](https://github.com/martinrotter/rssguard/commit/$git_revision) | [transfer.sh (7z)]($url) | $webengine_type | "
2017-10-24 10:43:48 +02:00
2017-11-14 07:26:55 +01:00
(Get-Content $wikifile) -replace $regex, $wikiline | Set-Content -Encoding "utf8" $wikifile
2017-10-24 10:43:48 +02:00
2019-04-03 10:07:18 +02:00
$file = (Get-ChildItem '*-win64.exe').Name
2017-10-24 10:43:48 +02:00
echo "File to upload: $file"
$url = curl.exe --upload-file "$file" "https://transfer.sh/$file" --silent
echo "Obtained URL: $url"
$webengine_type = if ($file -like '*nowebengine*') { echo "false" } else { echo "true" }
$regex = "\| Windows \|.+transfer\.sh \(exe\).+ $webengine_type \| "
$wikiline = "| Windows | $date | [$git_revision](https://github.com/martinrotter/rssguard/commit/$git_revision) | [transfer.sh (exe)]($url) | $webengine_type | "
2017-10-24 10:43:48 +02:00
2017-11-14 07:26:55 +01:00
(Get-Content $wikifile) -replace $regex, $wikiline | Set-Content -Encoding "utf8" $wikifile
2017-10-24 08:48:04 +02:00
2017-10-24 09:19:38 +02:00
2017-10-24 08:30:12 +02:00
cd C:\rssguard-wiki
git add *.*
git commit -m "New files."
git pull origin master
git push origin master -v