diff --git a/.github/workflows/issues-closer.yml b/.github/workflows/issues-closer.yml deleted file mode 100644 index 943bae37..00000000 --- a/.github/workflows/issues-closer.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Close Added/Fixed Issues - -on: - release: - types: [published] - -jobs: - close_issues: - name: Check Issues / PRs - runs-on: ubuntu-latest - steps: - - name: Close Issues (added/fixed) - uses: actions/stale@v3 - with: - only-issues-labels: 'added,fixed' - close-issue-message: > - This is now available in the latest release. - close-issue-label: 'released' - days-before-issue-stale: 0 - days-before-issue-close: 0 - ignore-updates: true diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a5997812..762371f8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,20 +10,24 @@ build: os: ubuntu-20.04 tools: python: "3.9" - apt_packages: - - cmake - - ffmpeg - - libboost-filesystem-dev - - libboost-log-dev - - libboost-thread-dev - jobs: - pre_build: - - cmake . -# Include the submodules, required for cmake -submodules: - include: all - recursive: true +## apt packages required packages to run cmake on sunshine, note that additional packages are required +# apt_packages: +# - cmake +# - ffmpeg +# - libboost-filesystem-dev +# - libboost-log-dev +# - libboost-thread-dev + +## run cmake +# jobs: +# pre_build: +# - cmake . + +## Include the submodules, required for cmake +#submodules: +# include: all +# recursive: true # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/CMakeLists.txt b/CMakeLists.txt index dcbd6942..862e4f1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -319,7 +319,6 @@ else() endif() configure_file(version.h.in version.h @ONLY) -configure_file(docs/source/conf.py.in "${CMAKE_CURRENT_SOURCE_DIR}/docs/source/conf.py" @ONLY) include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(SUNSHINE_TARGET_FILES diff --git a/docs/source/conf.py.in b/docs/source/conf.py similarity index 84% rename from docs/source/conf.py.in rename to docs/source/conf.py index 99ce7143..86b7b805 100644 --- a/docs/source/conf.py.in +++ b/docs/source/conf.py @@ -6,6 +6,8 @@ # standard imports from datetime import datetime +import os +import re # -- Path setup -------------------------------------------------------------- @@ -13,8 +15,6 @@ from datetime import datetime # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -import os -# import sys script_dir = os.path.dirname(os.path.abspath(__file__)) # the directory of this file source_dir = os.path.dirname(script_dir) # the source folder directory @@ -26,8 +26,16 @@ copyright = f'{datetime.now ().year}, {project}' author = 'ReenigneArcher' # The full version, including alpha/beta/rc tags -version = '@PROJECT_VERSION@' - +with open(os.path.join(root_dir, 'CMakeLists.txt'), 'r') as f: + version = re.search(r"project\(Sunshine VERSION ((\d+)\.(\d+)\.(\d+))\)", str(f.read())).group(1) +""" +To use cmake method for obtaining version instead of regex, +1. Within CMakeLists.txt add the following line without backticks: + ``configure_file(docs/source/conf.py.in "${CMAKE_CURRENT_SOURCE_DIR}/docs/source/conf.py" @ONLY)`` +2. Rename this file to ``conf.py.in`` +3. Uncomment the next line +""" +# version = '@PROJECT_VERSION@' # use this for cmake configure_file method # -- General configuration ---------------------------------------------------