-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·27 lines (17 loc) · 917 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -e
HERE="$(realpath "$(dirname "$0")")"
deno install -rf --allow-read="$HERE/" --allow-write="$HERE/" --allow-net https://deno.land/x/udd/main.ts
#echo "{\"version\":\"`git describe --tags`\"}" > "$HERE/version.json"
cd "$HERE" && (
udd `find . -type f -name "*.ts"`
deno --unstable fmt `find . -type f -name "*.md"`
deno --unstable fmt `find . -type f -name "*.ts"`
# This detects the hack pattern, only on the second line of the file
# and removes the added semicolon if present. `deno fmt` breaks the
# hack shebang pattern, so we have to fix it up.
sed -i '2s|^":";\s[/][/]#;|":" //#;|' `find . -type f -name "*.ts"`
deno --unstable lint `find . -type f -name "*.ts"`
deno --unstable check `find . -type f -name "*.ts"`
deno --unstable test --trace-ops --reload --allow-read --allow-run=grep,sort,uniq,gunzip,ls,deno,cat,bash,wc,tr,head ./tests
)