Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: GitHub noreply@github.com Date: Sat, 14 Oct 2023 10:48:08 UTC Commit: 0549a7b8082e839ddd64e47254ea9142a427b07c https://github.com/geany/geany/commit/0549a7b8082e839ddd64e47254ea9142a427b0...
Log Message: ----------- Fix meson build without git repo (#3597)
Fixes #3424.
Modified Paths: -------------- meson.build
Modified: meson.build 10 lines changed, 6 insertions(+), 4 deletions(-) =================================================================== @@ -166,12 +166,14 @@ python = pymod.find_installation('python3', modules: doxygen.found() and get_opt rst2html = find_program('rst2html', required: get_option('html-docs')) rst2pdf = find_program('rst2pdf', required: get_option('pdf-docs')) git = find_program('git', required: false) +revision = '-1' if git.found() - ret = run_command(git, 'rev-parse', '--short', '--revs-only', 'HEAD', check: true) - cdata.set_quoted('REVISION', ret.stdout().strip()) -else - cdata.set_quoted('REVISION', '-1') + ret = run_command(git, 'rev-parse', '--short', '--revs-only', 'HEAD', check: false) + if ret.returncode() == 0 + revision = ret.stdout().strip() + endif endif +cdata.set_quoted('REVISION', revision)
python_command = get_option('python-command') if python_command == '' or python_command == 'auto'
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).