[polari/ci] Make syntax check optional



commit a32b5f71f22fb85189f8894653552fbf9c10718f
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Oct 19 06:25:17 2017 +0200

    Make syntax check optional

 meson.build     | 2 +-
 src/meson.build | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 852d01c..048643b 100644
--- a/meson.build
+++ b/meson.build
@@ -28,7 +28,7 @@ girdir = join_paths(pkgdatadir, 'gir-1.0')
 typelibdir = join_paths(pkglibdir, 'girepository-1.0')
 
 gjs_console = find_program('gjs')
-js52 = find_program('js52')
+js52 = find_program('js52', required: false)
 
 desktop_file_validate = find_program('desktop-file-validate', required: false)
 appstream_util = find_program('appstream-util', required: false)
diff --git a/src/meson.build b/src/meson.build
index 004b4cf..084d6e7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -45,9 +45,12 @@ js_xml = []
 foreach js_source : js_sources
   js_xml += '    <file>@0@</file>'.format(js_source)
 
-  test('Syntax check ' + js_source, js52,
-    args: ['-s', '-c', js_source],
-    workdir: meson.current_source_dir())
+  if (js52.found())
+    test('Syntax check ' + js_source, js52,
+      args: ['-s', '-c', js_source],
+      workdir: meson.current_source_dir()
+    )
+  endif
 endforeach
 
 resource_data = configuration_data()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]