forked from eclipse-cyclonedds/cyclonedds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Edit tag determiner for docs, now latest or version.
- Loading branch information
Showing
1 changed file
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ trigger: | |
- '*' | ||
branches: | ||
include: | ||
- '*' | ||
- 'master' | ||
|
||
pool: | ||
vmImage: ubuntu-20.04 | ||
|
@@ -67,14 +67,23 @@ steps: | |
git clone [email protected]:thijsmie/cddstemp.github.io.git documentation-repo | ||
name: get_site_repo | ||
displayName: Pull documentation repo | ||
- script: | | ||
- bash: | | ||
set -e -x | ||
if [ "$(Build.SourceBranchName)" = "master" ]; then | ||
echo "###vso[task.setvariable variable=docs_tag;]latest" | ||
else | ||
echo "###vso[task.setvariable variable=docs_tag;]$(echo '$(Build.SourceBranchName)' | grep -Eo '^[[:digit:]]\.[[:digit:]]\.[[:digit:]]')" | ||
fi | ||
name: "determine_docu_tag" | ||
displayName: Determine the documentation version number | ||
- bash: | | ||
set -e -x | ||
rm -rf "documentation-repo/docs/c/$(Build.SourceBranchName)" || true | ||
cp -R "build/docs/docs" "documentation-repo/docs/c/$(Build.SourceBranchName)" | ||
rm -rf "documentation-repo/docs/c/${DOCS_TAG}" || true | ||
cp -R "build/docs/docs" "documentation-repo/docs/c/${DOCS_TAG})" | ||
cd documentation-repo | ||
git add "docs/c/$(Build.SourceBranchName)" | ||
git config --local user.name "Azure Pipelines" | ||
git config --local user.email "[email protected]" | ||
(git commit -m "Publishing GitHub Pages $(Build.SourceVersion)" && git push -f origin HEAD:master) || true | ||
(git commit -m "Publishing GitHub Pages ${DOCS_TAG}" && git push origin HEAD:master) || true | ||
name: 'commit_pages' | ||
displayName: Commit new documentation into repo |