Browse Source

Switched to git-do

pull/13/head
Anairkoen Schno 5 years ago
parent
commit
ee55fb9ffd
1 changed files with 17 additions and 10 deletions
  1. +17
    -10
      appveyor.yml

+ 17
- 10
appveyor.yml View File

@ -66,24 +66,28 @@ before_deploy:
{
cd docs
git config --global core.autocrlf true
git config --global credential.helper store
Add-Content "$HOME\.git-credentials" "https://$($env:gh_token):[email protected]`n"
git config --global user.email $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL
git config --global user.name $env:APPVEYOR_REPO_COMMIT_AUTHOR
git clone -q "https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git" -b gh-pages origin_site
function Git-Do {
git config --global core.autocrlf true
git config --global credential.helper store
Add-Content "$HOME\.git-credentials" "https://$($env:gh_token):[email protected]`n"
git config --global user.email $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL
git config --global user.name $env:APPVEYOR_REPO_COMMIT_AUTHOR
git clone -q "https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git" -b gh-pages origin_site
if (-Not (Test-Path origin_site/tags))
{ New-Item -ItemType directory -Path origin_site/tags }
if (-Not (Test-Path origin_site/tags))
{ New-Item -ItemType directory -Path origin_site/tags }
}
if ($env:APPVEYOR_REPO_TAG -eq "true")
{ # Copy current site into tags
Git-Do
cd origin_site # make things a bit easier
$tagPath = "tags/$env:APPVEYOR_REPO_TAG_NAME"
New-Item -ItemType directory -Path $tagPath
Copy-Item -Path (Get-ChildItem -Exclude ('.git','tags')).FullName -Destination $tagPath -Recurse
git add -A 2>&1
git commit -q -a -m "Saved tag $env:APPVEYOR_REPO_TAG_NAME" 2>&1
}
@ -95,9 +99,12 @@ before_deploy:
if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
Git-Do
Move-Item origin_site/.git _site
Move-Item origin_size/tags _site
CD _site
git add -A 2>&1
git commit -q -a -m "$env:APPVEYOR_REPO_COMMIT_MESSAGE -- Generated Docs" 2>&1


Loading…
Cancel
Save