commit
c6d4a5f916
|
@ -0,0 +1,17 @@
|
||||||
|
name: Verify Format
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Patch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Verify domain.txt
|
||||||
|
run: |
|
||||||
|
./hack/verify-fmt.sh domain.txt || { echo "Please run './hack/fmt.sh domain.txt'"; exit 1; }
|
||||||
|
- name: Verify mirror.txt
|
||||||
|
run: |
|
||||||
|
./hack/verify-fmt.sh mirror.txt || { echo "Please run './hack/fmt.sh mirror.txt'"; exit 1; }
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
cat $1 | sort | tac > $1.tmp && mv $1.tmp $1
|
cat $1 | sort -u | grep -v '^$' > $1.tmp && mv $1.tmp $1
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cp $1 $1.bak
|
||||||
|
./hack/fmt.sh $1
|
||||||
|
|
||||||
|
diff -c $1 $1.bak
|
||||||
|
rm $1.bak
|
Loading…
Reference in New Issue