File indexing completed on 2024-05-12 04:17:32

0001 #!/bin/bash
0002 
0003 # SPDX-FileCopyrightText: 2013-2021, Gilles Caulier, <caulier dot gilles at gmail dot com>
0004 #
0005 # SPDX-License-Identifier: BSD-3-Clause
0006 #
0007 
0008 ORIG_WD="`pwd`"
0009 API_DIR="${ORIG_WD}/../../html"
0010 WEBSITE_DIR="${ORIG_WD}/site"
0011 
0012 rm -fr $API_DIR || true
0013 rm -fr $WEBSITE_DIR || true
0014 
0015 cd ${ORIG_WD}/../../ && doxygen
0016 cd ${ORIG_WD}
0017 
0018 git clone git@invent.kde.org:websites/digikam-org.git $WEBSITE_DIR
0019 
0020 cd $WEBSITE_DIR
0021 
0022 git checkout -b dev remotes/origin/dev
0023 
0024 cd $WEBSITE_DIR
0025 rm -r $WEBSITE_DIR/static/api || true
0026 mkdir -p $WEBSITE_DIR/static/api
0027 cd $API_DIR
0028 cp -r ./ $WEBSITE_DIR/static/api/
0029 cd $WEBSITE_DIR
0030 
0031 # Add new report contents in dev branch
0032 
0033 git add $WEBSITE_DIR/static/api
0034 git commit . -m"update API documentation"
0035 git push
0036 
0037 # update master branch
0038 
0039 git checkout master
0040 git merge dev -m"Update API documentation"
0041 git push
0042 
0043 echo "API documentation published to https://www.digikam.org/api"
0044 echo "Web site will be synchronized in few minutes..."