-
Notifications
You must be signed in to change notification settings - Fork 383
Expand file tree
/
Copy pathmise.toml
More file actions
94 lines (77 loc) · 3.05 KB
/
Copy pathmise.toml
File metadata and controls
94 lines (77 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copyright (C) 2026 The ORT Project Copyright Holders <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# License-Filename: LICENSE
[env]
_.file = ".env.versions"
[tools]
# Runtimes
java = "{{ env.JAVA_VERSION }}"
python = "{{ env.PYTHON_VERSION }}"
ruby = "{{ env.RUBY_VERSION }}"
# Gradle Wrapper
coreutils = {
version = "latest",
postinstall = """
cd $(dirname $(which coreutils))
# Create links for all tools built into coreutils.
./coreutils --list | xargs -i ln -s coreutils {}
# Create links to the "host" for tools not available via mise.
ln -s /usr/bin/bash bash
ln -s /usr/bin/bash sh
ln -s /usr/bin/xargs xargs
ln -s /usr/bin/sed sed
ln -s /usr/bin/grep grep
ln -s /usr/bin/git git
ln -s /usr/bin/ssh ssh
"""
}
# Scanners
"github:jpeddicord/askalono" = "{{ env.ASKALONO_VERSION }}"
"gem:licensee" = "{{ env.LICENSEE_VERSION }}"
"github:mstykow/provenant" = "{{ env.PROVENANT_VERSION }}"
"pipx:scancode-toolkit" = "{{ env.SCANCODE_VERSION }}"
# Version Control Systems
"http:git-repo" = { version ="0", url = "https://storage.googleapis.com/git-repo-downloads/repo" }
"pipx:mercurial" = "latest"
[tasks.isolate]
alias = "isolated"
description = "Run commands in isolation from the host with only mise tools available."
usage = "arg '<commands>' var=#true help='The command to run.'"
# Deny inheriting most environment variables.
deny_env = true
# Strip everything but mise install directories from the path environment.
env.PATH_MINIMAL = """
{% set_global minimal_paths = [] %}
{% for path in env.PATH | split(pat=":") %}
{% if "/mise/installs/" in path %}
{% set_global minimal_paths = minimal_paths | concat(with=path) %}
{% endif %}
{% endfor %}
{{ minimal_paths | join(sep=":") }}
"""
env.PATH = "{{ env.PATH_MINIMAL | trim }}"
run = """{{ usage.commands | join(sep=" ") }}"""
[tasks.gradle]
description = "Run Gradle tasks in isolation from the host."
usage = "arg '<tasks>' var=#true help='The Gradle task to run.'"
run = """mise run isolated $MISE_PROJECT_ROOT/gradlew {{ usage.tasks | join(sep=" ") }}"""
[tasks.ort]
description = "Run an ORT command in isolation from the host."
usage = "arg '<command>' var=#true help='The ORT command to run.'"
run = """mise run gradle -q :cli:run --args='{{ usage.command | join(sep=" ") }}'"""
[tasks.test]
description = "Run ORT (functional) tests in isolation from the host."
run = """mise run gradle -q :cli-test-launcher:run"""