Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 2 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all build test clean embed build-ts build-go test-ts test-go clean-ts clean-go publish-go tags-go tidy-go reset
.PHONY: all build test clean reset build-ts build-go test-ts test-go clean-ts clean-go

all: build test

Expand All @@ -8,10 +8,6 @@ test: test-ts test-go

clean: clean-ts clean-go

# Embed jsonc-grammar.jsonic into src/jsonc.ts and go/jsonc.go.
embed:
node embed-grammar.js

# TypeScript
build-ts:
npm run build
Expand All @@ -23,7 +19,7 @@ clean-ts:
rm -rf dist dist-test

# Go
build-go: embed
build-go:
cd go && go build ./...

test-go:
Expand All @@ -32,22 +28,6 @@ test-go:
clean-go:
cd go && go clean -cache

# Publish Go module: make publish-go V=0.1.1
publish-go: test-go
@test -n "$(V)" || (echo "Usage: make publish-go V=x.y.z" && exit 1)
sed -i '' 's/^const Version = ".*"/const Version = "$(V)"/' go/jsonc.go
git add go/jsonc.go
git commit -m "go: v$(V)"
git tag go/v$(V)
git push origin main go/v$(V)
if command -v gh >/dev/null 2>&1; then gh release create go/v$(V) --title "go/v$(V)" --notes "Go module release v$(V)"; fi

tidy-go:
cd go && go mod tidy

tags-go:
git tag -l 'go/v*' --sort=-version:refname

reset:
npm run reset
cd go && go clean -cache
Expand Down
Loading
Loading