forked from oxc-project/tsgolint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
52 lines (40 loc) · 1.33 KB
/
justfile
File metadata and controls
52 lines (40 loc) · 1.33 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env -S just --justfile
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
set shell := ["bash", "-cu"]
ready:
just fmt
just lint
just test
[unix]
init:
git submodule update --init
pushd typescript-go && git am --3way --no-gpg-sign ../patches/*.patch && popd
mkdir -p internal/collections && find ./typescript-go/internal/collections -type f ! -name '*_test.go' -exec cp {} internal/collections/ \;
[windows]
init:
git submodule update --init
pushd typescript-go; Get-ChildItem ../patches/*.patch | ForEach-Object { git am --3way --no-gpg-sign $_.FullName }; popd
New-Item -ItemType Directory -Force -Path internal\collections
Get-ChildItem -Path .\typescript-go\internal\collections\* -File | Where-Object { $_.Name -notlike '*_test.go' } | ForEach-Object { Copy-Item $_.FullName -Destination .\internal\collections\ }
[unix]
build:
go build -o tsgolint ./cmd/tsgolint
[windows]
build:
$env:GOOS="windows"; $env:GOARCH="amd64"; go build -o tsgolint.exe ./cmd/tsgolint
test: build
cd e2e && pnpm run test --run && cd ..
go test ./internal/...
update-snaps:
UPDATE_SNAPS=true go test ./internal/...
lint:
golangci-lint run
fmt:
gofmt -w internal cmd tools
pnpm run fmt
shim:
go run tools/gen_shims/main.go
pull:
pushd typescript-go && git reset --hard origin/main
git pull
just init