mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove obsolete AppVeyor docs deploy step
This commit is contained in:
@@ -102,9 +102,6 @@ deploy:
|
||||
on:
|
||||
appveyor_repo_tag: true
|
||||
|
||||
on_success:
|
||||
- ps: scripts\appveyor\deploy_docs.ps1
|
||||
|
||||
on_finish:
|
||||
- ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\tests.xml")
|
||||
- ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\api-tests.xml")
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
$docsRepoUrl = 'https://github.com/loot/loot.github.io.git'
|
||||
$docsRepoPath = 'C:\projects\loot.github.io'
|
||||
$docsIndex = 'docs/index.html'
|
||||
$sourceFolder = $env:APPVEYOR_BUILD_FOLDER + '/docs'
|
||||
$destinationFolder = 'docs/' + $env:APPVEYOR_REPO_TAG_NAME
|
||||
|
||||
$searchOption = '<option value="([^"]+)" selected>([^<]+)</option>'
|
||||
$replaceOption = '<option value="$1">$2</option>'
|
||||
|
||||
$searchSelect = '(<select id="versionSelect">)'
|
||||
$replaceSelect = '$1' + "`n" + ' <option value="' + $env:APPVEYOR_REPO_TAG_NAME + '" selected>v' + $env:APPVEYOR_REPO_TAG_NAME + '</option>'
|
||||
|
||||
$docsFiles = @(
|
||||
'images'
|
||||
'licenses'
|
||||
'LOOT Readme.html'
|
||||
)
|
||||
|
||||
$commitMessage = 'Add v' + $env:APPVEYOR_REPO_TAG_NAME + " release docs`n`n From " + $env:APPVEYOR_REPO_NAME + '#' + $env:APPVEYOR_REPO_COMMIT
|
||||
|
||||
if ($env:APPVEYOR_REPO_TAG -eq 'true') {
|
||||
cd 'C:\projects'
|
||||
git clone $docsRepoUrl
|
||||
|
||||
# Edit the docs index to list and select by default the new release docs. | %{$_ -replace $searchSelect, $replaceSelect}
|
||||
cd $docsRepoPath
|
||||
$newDocsIndex = (cat $docsIndex) | %{$_ -replace $searchOption, $replaceOption} | %{$_ -replace $searchSelect, $replaceSelect} | %{$_ -replace "`n$", ''}
|
||||
[IO.File]::WriteAllLines($docsRepoPath + '\' + $docsIndex, $newDocsIndex)
|
||||
|
||||
# Add the docs to their subfolder.
|
||||
foreach($file in $docsFiles) {
|
||||
cp $($sourceFolder + '/' + $file) $($destinationFolder + '/' + $file) -Force -recurse
|
||||
}
|
||||
|
||||
# Configure Git credentials
|
||||
git config credential.helper store
|
||||
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
|
||||
git config user.email "oliver.hamlet+wrinklyrobot@gmail.com"
|
||||
git config user.name "WrinklyRobot"
|
||||
|
||||
# Commit and push the changes.
|
||||
git add $docsIndex $destinationFolder
|
||||
git commit -m $commitMessage
|
||||
git push
|
||||
}
|
||||
Reference in New Issue
Block a user