Browse Source

Switched to git-do

pull/46/head
Anairkoen Schno 5 years ago
parent
commit
8e90dadf2f
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 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") if ($env:APPVEYOR_REPO_TAG -eq "true")
{ # Copy current site into tags { # Copy current site into tags
Git-Do
cd origin_site # make things a bit easier cd origin_site # make things a bit easier
$tagPath = "tags/$env:APPVEYOR_REPO_TAG_NAME" $tagPath = "tags/$env:APPVEYOR_REPO_TAG_NAME"
New-Item -ItemType directory -Path $tagPath New-Item -ItemType directory -Path $tagPath
Copy-Item -Path (Get-ChildItem -Exclude ('.git','tags')).FullName -Destination $tagPath -Recurse Copy-Item -Path (Get-ChildItem -Exclude ('.git','tags')).FullName -Destination $tagPath -Recurse
git add -A 2>&1 git add -A 2>&1
git commit -q -a -m "Saved tag $env:APPVEYOR_REPO_TAG_NAME" 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){ if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode." throw [System.Exception] "docfx build failed with exit code $lastexitcode."
} }
Git-Do
Move-Item origin_site/.git _site Move-Item origin_site/.git _site
Move-Item origin_size/tags _site Move-Item origin_size/tags _site
CD _site CD _site
git add -A 2>&1 git add -A 2>&1
git commit -q -a -m "$env:APPVEYOR_REPO_COMMIT_MESSAGE -- Generated Docs" 2>&1 git commit -q -a -m "$env:APPVEYOR_REPO_COMMIT_MESSAGE -- Generated Docs" 2>&1


Loading…
Cancel
Save