MCPcopy Create free account
hub / github.com/defold/defold / read_merged_project_value

Function read_merged_project_value

editor/scripts/bundle.py:358–366  ·  view source on GitHub ↗

Print a value from the Leiningen project after profile merging. Leiningen does not provide a small built-in task for printing an arbitrary merged project key. `update-in` applies the function before running the following task, so using `clojure.core/prn` lets us capture the value while

(profile, key, jdk_path=None)

Source from the content-addressed store, hash-verified

356 return invoke_lein(['with-profile', 'zip-parallel', 'run', '-m', 'editor.zip-parallel'] + args, jdk_path=jdk_path)
357
358def read_merged_project_value(profile, key, jdk_path=None):
359 """Print a value from the Leiningen project after profile merging.
360
361 Leiningen does not provide a small built-in task for printing an arbitrary
362 merged project key. `update-in` applies the function before running the
363 following task, so using `clojure.core/prn` lets us capture the value while
364 `version` gives Leiningen a cheap task to run afterwards.
365 """
366 return invoke_lein(['with-profile', profile, 'update-in', key, 'clojure.core/prn', '--', 'version'], jdk_path=jdk_path)
367
368def parse_lein_string(value):
369 for line in value.splitlines():

Callers 1

Calls 1

invoke_leinFunction · 0.85

Tested by

no test coverage detected