Run gofmt via python, easier to debug
This commit is contained in:
parent
4b69a600e5
commit
1429be3a19
5
.github/workflows/ci.py
vendored
5
.github/workflows/ci.py
vendored
@ -130,6 +130,11 @@ def main():
|
||||
package_kitty()
|
||||
elif action == 'test':
|
||||
test_kitty()
|
||||
elif action == 'gofmt':
|
||||
q = subprocess.check_output('gofmt -s -l tools version.go'.split())
|
||||
if q.strip():
|
||||
print(q.decode())
|
||||
raise SystemExit(1)
|
||||
else:
|
||||
raise SystemExit(f'Unknown action: {action}')
|
||||
|
||||
|
||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -95,7 +95,7 @@ jobs:
|
||||
run: python -m flake8 --count .
|
||||
|
||||
- name: Run gofmt
|
||||
run: sh -c 'unformatted=$(gofmt -s -l tools version.go); [ -z "$unformatted" ] || { echo "$unformatted"; exit 1 }'
|
||||
run: python .github/workflows/ci.py gofmt
|
||||
|
||||
- name: Build kitty package
|
||||
run: python .github/workflows/ci.py package
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user