-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (34 loc) · 1.21 KB
/
Makefile
File metadata and controls
42 lines (34 loc) · 1.21 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
.PHONY: build test test-go test-ts test-ruby install clean embed-sdk
# Copy SDK files to internal/embedded for embedding into the binary
embed-sdk:
@echo "Copying SDK files for embedding..."
@rm -rf internal/embedded/typescript internal/embedded/ruby
@mkdir -p internal/embedded/typescript internal/embedded/ruby
@mkdir -p internal/embedded/typescript/proto
@cp -r sdk/typescript/dist/* internal/embedded/typescript/
@# Create minimal embedded package.json (runtime deps only, no devDependencies)
@python3 -c "\
import json, sys; \
d = json.load(open('sdk/typescript/package.json')); \
d['main'] = 'index.js'; \
d['types'] = 'index.d.ts'; \
d.pop('devDependencies', None); \
d.pop('overrides', None); \
print(json.dumps(d, indent=2)) \
" > internal/embedded/typescript/package.json
@cp proto/happerci.proto internal/embedded/typescript/proto/
@cp -r sdk/ruby/lib/* internal/embedded/ruby/
build: embed-sdk
go build -o bin/happerci ./cmd/happerci
install: embed-sdk
go install ./cmd/happerci
clean:
rm -rf bin/
rm -rf internal/embedded/typescript internal/embedded/ruby
test: test-go test-ts test-ruby
test-go:
go test ./...
test-ts:
cd sdk/typescript && npm test
test-ruby:
cd sdk/ruby && bundle exec rake test