feat: add pre-commit
All checks were successful
Build / build-8 (pull_request) Successful in 8s
Build / build-9 (pull_request) Successful in 8s

- test yamllint
- test ruff linting/formatter
- fix yaml errors
This commit is contained in:
Ben Vincent 2025-11-30 21:38:59 +11:00
parent 099b90fbc5
commit 3fa0d39d43
12 changed files with 41 additions and 11 deletions

19
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,19 @@
---
repos:
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.37.1
hooks:
- id: yamllint
args:
[
"-d {extends: relaxed, rules: {line-length: disable}}",
"-s",
]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.7
hooks:
# Run the linter.
- id: ruff-check
args: [--fix]
# Run the formatter.
- id: ruff-format

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -35,4 +36,4 @@ contents:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh
# postremove: ./scripts/postremove.sh

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -35,4 +36,4 @@ contents:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh
# postremove: ./scripts/postremove.sh

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -27,4 +28,4 @@ contents:
file_info:
mode: 0755
owner: root
group: root
group: root

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -33,4 +34,4 @@ contents:
file_info:
mode: 0755
owner: root
group: root
group: root

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -33,4 +34,4 @@ contents:
# Scripts to run during installation/removal
scripts:
postinstall: /app/resources/scripts/postinstall.sh
postinstall: /app/resources/scripts/postinstall.sh

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -32,4 +33,4 @@ contents:
# Scripts to run during installation/removal
scripts:
preinstall: /app/resources/scripts/preinstall.sh
preinstall: /app/resources/scripts/preinstall.sh

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -32,4 +33,4 @@ contents:
# Scripts to run during installation/removal
scripts:
preinstall: /app/resources/scripts/preinstall.sh
preinstall: /app/resources/scripts/preinstall.sh

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -27,4 +28,4 @@ depends:
- openbao-plugin-secret-nomad
# No actual files in this meta package
contents: []
contents: []

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -44,4 +45,4 @@ scripts:
preinstall: /app/resources/scripts/preinstall.sh
postinstall: /app/resources/scripts/postinstall.sh
preremove: /app/resources/scripts/preremove.sh
postremove: /app/resources/scripts/postremove.sh
postremove: /app/resources/scripts/postremove.sh

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -35,4 +36,4 @@ contents:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh
# postremove: ./scripts/postremove.sh

View File

@ -1,3 +1,4 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
@ -35,4 +36,4 @@ contents:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh
# postremove: ./scripts/postremove.sh