1
0
Fork 0

Merging upstream version 2.17.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:32:33 +01:00
parent 27828ee7f3
commit 66bc55f7a7
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
34 changed files with 336 additions and 116 deletions

View file

@ -3,7 +3,7 @@ import sys
LANGUAGES = [
'conda', 'coursier', 'dart', 'docker', 'docker_image', 'dotnet', 'fail',
'golang', 'node', 'perl', 'pygrep', 'python', 'r', 'ruby', 'rust',
'golang', 'lua', 'node', 'perl', 'pygrep', 'python', 'r', 'ruby', 'rust',
'script', 'swift', 'system',
]
FIELDS = [

5
testing/get-lua.sh Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
# Install the runtime and package manager.
sudo apt install lua5.3 liblua5.3-dev luarocks

View file

@ -15,8 +15,8 @@ from typing import Sequence
REPOS = (
('rbenv', 'https://github.com/rbenv/rbenv', '585ed84'),
('ruby-build', 'https://github.com/rbenv/ruby-build', 'e9fa4bf'),
('rbenv', 'https://github.com/rbenv/rbenv', '38e1fbb'),
('ruby-build', 'https://github.com/rbenv/ruby-build', '8663d2f'),
(
'ruby-download',
'https://github.com/garnieretienne/rvm-download',

View file

@ -1,3 +1,3 @@
FROM cogniteev/echo
FROM ubuntu:focal
CMD ["echo", "This is overwritten by the .pre-commit-hooks.yaml 'entry'"]

View file

@ -1,8 +1,8 @@
- id: echo-entrypoint
name: echo (via --entrypoint)
language: docker_image
entry: --entrypoint echo cogniteev/echo
entry: --entrypoint echo ubuntu:focal
- id: echo-cmd
name: echo (via cmd)
language: docker_image
entry: cogniteev/echo echo
entry: ubuntu:focal echo

View file

@ -0,0 +1,4 @@
- id: hello-world-lua
name: hello world lua
entry: hello-world-lua
language: lua

View file

@ -0,0 +1,3 @@
#!/usr/bin/env lua
print('hello world')

View file

@ -0,0 +1,15 @@
package = "hello"
version = "dev-1"
source = {
url = "git+ssh://git@github.com/pre-commit/pre-commit.git"
}
description = {}
dependencies = {}
build = {
type = "builtin",
modules = {},
install = {
bin = {"bin/hello-world-lua"}
},
}

View file

@ -48,6 +48,10 @@ skipif_cant_run_docker = pytest.mark.skipif(
os.name == 'nt' or not docker_is_running(),
reason="Docker isn't running or can't be accessed",
)
skipif_cant_run_lua = pytest.mark.skipif(
os.name == 'nt',
reason="lua isn't installed or can't be found",
)
skipif_cant_run_swift = pytest.mark.skipif(
parse_shebang.find_executable('swift') is None,
reason="swift isn't installed or can't be found",

View file

@ -71,7 +71,7 @@ def main() -> int:
_msg('populating wheels...')
_exit_if_retv(
'podman', 'run', '--rm', '--volume', f'{wheeldir}:/wheels:rw', IMG,
'pip', 'wheel', f'pre_commit=={args.version}',
'pip', 'wheel', f'pre_commit=={args.version}', 'setuptools',
'--wheel-dir', '/wheels',
)