5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 15:46:21 +00:00

refactor: helper script

This commit is contained in:
f 2024-01-08 17:55:46 -03:00
parent d581fab4df
commit bf637bcc5c
No known key found for this signature in database
2 changed files with 10 additions and 2 deletions

View file

@ -47,7 +47,7 @@ rubocop:
before_script: before_script:
- "apk add go-task" - "apk add go-task"
script: script:
- "git diff --name-status ${CI_MERGE_REQUEST_DIFF_BASE_SHA}...HEAD | grep -v \"^D\" | cut -f 2 | grep \"\.rb$\" | xargs go-task bundle -- exec rubocop" - "./bin/modified_files | grep \"\.rb$$\" | xargs go-task bundle -- exec rubocop"
haml: haml:
stage: "lint" stage: "lint"
rules: rules:
@ -55,4 +55,4 @@ haml:
before_script: before_script:
- "apk add go-task" - "apk add go-task"
script: script:
- "git diff --name-status ${CI_MERGE_REQUEST_DIFF_BASE_SHA}...HEAD | grep -v \"^D\" | cut -f 2 | grep \"\.haml$\" | xargs go-task bundle -- exec haml-lint" - "./bin/modified_files | grep \"\.haml$$\" | xargs go-task bundle -- exec haml-lint"

8
bin/modified_files Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
set -e
test -n "${CI_MERGE_REQUEST_DIFF_BASE_SHA}"
git diff --name-status ${CI_MERGE_REQUEST_DIFF_BASE_SHA}...rails \
| grep -v "^D" \
| cut -f 2