From ee55fb9ffdb7102004729b186c0269c09be9f6b7 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Tue, 11 Jun 2019 19:53:48 -0500 Subject: [PATCH] Switched to git-do --- appveyor.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d40ea6f4..c9a84ab6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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):x-oauth-basic@github.com`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):x-oauth-basic@github.com`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