From b13637bc1eeaa4777f7f931e9fefe14e2f870e62 Mon Sep 17 00:00:00 2001 From: imoldovan Date: Thu, 23 May 2024 14:05:30 +0300 Subject: [PATCH] update --- index.md | 3 ++- releaseDocs.ps1 | 15 +++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/index.md b/index.md index 5f2a3e528..e6f8b3ce0 100644 --- a/index.md +++ b/index.md @@ -20,8 +20,9 @@ Find more of our code samples on [GitHub](https://github.com/RWS/trados-studio-a ## API versions -### [ 2022 - API 17.1](http://developers.rws.com/studio-api-docs/17.1/index.html) +### [ 2024 - API 18.0](http://developers.rws.com/studio-api-docs/index.html) +### [ 2022 - API 17.1](http://developers.rws.com/studio-api-docs/17.1/index.html) ### [ 2022 - API 17.0](http://developers.rws.com/studio-api-docs/17.0/index.html) diff --git a/releaseDocs.ps1 b/releaseDocs.ps1 index 223de5893..1e3bbef15 100644 --- a/releaseDocs.ps1 +++ b/releaseDocs.ps1 @@ -13,7 +13,7 @@ $remote_repo="https://github-actions:${TOKEN}@github.com/sdl/studio-api-docs.git write-host "Cloning the repo $remote_repo with the gh-pages branch" git clone $remote_repo --branch gh-pages $TEMP_REPO_DIR -Set-Location $TEMP_REPO_DIR +cd $TEMP_REPO_DIR #delete gh-pages_temp branch if already exist $checkBranch = git show-ref origin/gh-pages_temp @@ -24,20 +24,15 @@ if($checkBranch){ } git checkout -b gh-pages_temp -$items = Get-ChildItem -foreach ($item in $items){ - if (($item.Name -ne "15.2") -and ($item.Name -ne "16.1") -and ($item.Name -ne "16.2") -and ($item.Name -ne "17.0") -and ($item.Name -ne "17.1")){ - git rm $item -r - } -} +git rm ".\17.2\*" -r +mkdir "17.2" write-host "Copy documentation into the repo" - -Copy-Item "$SOURCE_DIR\_site\*" .\ -Recurse -force +Copy-Item "$SOURCE_DIR\_site\17.2\*" .\17.2\ -Recurse -force write-host "Push the new docs to the remote branch" git config --local user.email "github-actions[bot]@users.noreply.sdl.com" git config --local user.name "github-actions[bot]" -git add .\ -A +git add .\17.2 -A git commit -m "Update generated documentation" git push "$remote_repo" HEAD:gh-pages_temp Write-Output (${TOKEN}) | gh auth login --with-token