SVGSharpie/release-docs.sh

29 строки
753 B
Bash
Исходник Обычный вид История

2019-02-14 02:55:33 +03:00
#!/bin/sh
set -e
2019-02-14 18:15:37 +03:00
export VSINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
export VisualStudioVersion="15.0"
2019-02-14 02:55:33 +03:00
docfx ./docs/docfx.json
SOURCE_DIR=$PWD
2019-02-14 10:41:17 +03:00
TEMP_REPO_DIR=$PWD/../svgsharpie-docfx
2019-02-14 02:55:33 +03:00
echo "Removing temporary doc directory $TEMP_REPO_DIR"
rm -rf $TEMP_REPO_DIR
mkdir $TEMP_REPO_DIR
echo "Cloning the repo with the gh-pages branch"
2019-02-14 10:41:17 +03:00
git clone https://github.com/equinox2k/equinox2k.github.io.git --branch master $TEMP_REPO_DIR
2019-02-14 02:55:33 +03:00
echo "Clear repo directory"
cd $TEMP_REPO_DIR
git rm -r *
echo "Copy documentation into the repo"
2019-02-15 17:56:22 +03:00
cp -r $SOURCE_DIR/docs/_site/* .
2019-02-14 02:55:33 +03:00
echo "Push the new docs to the remote branch"
git add . -A
2019-02-14 19:39:54 +03:00
git diff-index --quiet HEAD || git commit -m "Update generated documentation"
2019-02-14 10:41:17 +03:00
git push origin master