mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-25 14:16:22 +00:00
refactor: helper script
This commit is contained in:
parent
d581fab4df
commit
bf637bcc5c
2 changed files with 10 additions and 2 deletions
|
@ -47,7 +47,7 @@ rubocop:
|
|||
before_script:
|
||||
- "apk add go-task"
|
||||
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:
|
||||
stage: "lint"
|
||||
rules:
|
||||
|
@ -55,4 +55,4 @@ haml:
|
|||
before_script:
|
||||
- "apk add go-task"
|
||||
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
8
bin/modified_files
Executable 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
|
Loading…
Reference in a new issue