File: upload_ghpages.bat

package info (click to toggle)
datalab 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 36,260 kB
  • sloc: python: 29,592; makefile: 3
file content (32 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
REM This script was copied from PythonQwt project
REM ======================================================
REM Upload GitHub Pages documentation
REM ======================================================
REM Licensed under the terms of the MIT License
REM Copyright (c) 2020 Pierre Raybaut
REM (see PythonQwt LICENSE file for more details)
REM ======================================================

@REM Get the target path for GitHub Pages from `DATALAB_GHPAGES` environment variable:
@REM if this variable is not defined, interrupt the script and show an error message
if not defined DATALAB_GHPAGES (
    echo ERROR: DATALAB_GHPAGES environment variable is not defined.
    echo Please define it to the path of the local clone of the GitHub Pages repository.
    echo For instance:
    echo     set DATALAB_GHPAGES=C:\Dev\DataLab-Platform.github.io
    echo.
    echo Then, run this script again.
    exit /b 1
)

call %~dp0utils GetScriptPath SCRIPTPATH

pushd %DATALAB_GHPAGES%
git checkout main
git add .
git commit -m "Update documentation"
git push origin main
popd

call %FUNC% EndOfScript