diff --git a/buildpack/core/mono.py b/buildpack/core/mono.py index 15077092c..ab2fc79f0 100644 --- a/buildpack/core/mono.py +++ b/buildpack/core/mono.py @@ -88,7 +88,9 @@ def ensure_and_get_mono(mx_version, buildpack_dir, cache_dir): ) return mono_location else: - version = get_dependency(dependency_name, buildpack_dir)["version"] + version = get_dependency(dependency_name, buildpack_dir=buildpack_dir)[ + "version" + ] try: mono_location = _get_mono_path("/tmp/opt", version) except NotFoundException: diff --git a/buildpack/core/mxbuild.py b/buildpack/core/mxbuild.py index 646f63aad..6bbcc9677 100644 --- a/buildpack/core/mxbuild.py +++ b/buildpack/core/mxbuild.py @@ -42,17 +42,25 @@ def build_from_source( util.lazy_remove_file(BUILD_ERRORS_JSON) - args = [ + build_command = [ os.path.join(mono_location, "bin/mono"), "--config", os.path.join(mono_location, "etc/mono/config"), os.path.join(mxbuild_location, "modeler/mxbuild.exe"), + ] + + if runtime_version >= 10: # mx10 support + build_command = [os.path.join(mxbuild_location, "modeler/mxbuild")] + + parameters = [ "--target=package", "--output=/tmp/model.mda", f"--java-home={jdk_location}", f"--java-exe-path={os.path.join(jdk_location, 'bin/java')}", ] + args = build_command + parameters + if runtime_version >= 6.4 or os.environ.get("FORCE_WRITE_BUILD_ERRORS"): args.append(f"--write-errors={BUILD_ERRORS_JSON}") logging.debug("Will write build errors to %s", BUILD_ERRORS_JSON) diff --git a/buildpack/stage.py b/buildpack/stage.py index 232d390b8..e89100de4 100755 --- a/buildpack/stage.py +++ b/buildpack/stage.py @@ -183,6 +183,7 @@ def cleanup_dependency_cache(cached_dir, dependency_list): runtime_version, JAVA_VERSION, ) + copy_dependency_file() # dependency file was deleted after mpk build process except RuntimeError as error: logging.error(error) sys.exit(1)