-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
67 lines (57 loc) · 1.91 KB
/
Copy pathmise.toml
File metadata and controls
67 lines (57 loc) · 1.91 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[tools]
go = "1.25.11"
golangci-lint = "2.12.2"
mockery = "3.5.5"
node = "22"
[settings]
experimental = true
idiomatic_version_file_enable_tools = []
[env]
# verbose logging
SR_DEBUG = "1"
# elastic — point these at your Elasticsearch/Kibana deployment
# SR_KIBANA_URL = "https://<your-kibana-host>:9243"
# SR_ELASTIC_CLOUD_ID = "<your-elastic-cloud-id>"
SR_ELASTIC_INDEX = "logs-asp.results-default"
# collectors
SR_COLLECTOR_USER_AGENT_FIELD = "user_agent.original"
# misc
SR_SSH_LOGGING_ENABLED = "1"
OPENSPEC_TELEMETRY = 0
[tasks.build]
depends = ["build-server"]
run = "echo 'Built simrun binary'"
description = "Build all binaries"
[tasks.lint]
run = "golangci-lint run ./..."
description = "Run golangci-lint"
[tasks.fmt]
run = "golangci-lint fmt ./..."
description = "Format Go code (gofmt + goimports)"
[tasks.test]
run = "go test ./..."
description = "Run Go tests"
[tasks.parser]
run = """
#!/usr/bin/env bash
go get github.com/atombender/go-jsonschema/...
go install github.com/atombender/go-jsonschema@latest
go-jsonschema -p parser schemas/simrun.schema.json > internal/parser/parser.go
"""
description = "Generate Go types from JSON schema"
[tasks.build-frontend]
run = "cd web/frontend && npm ci && npm run build"
description = "Build SvelteKit frontend"
[tasks.copy-frontend]
depends = ["build-frontend"]
run = "rm -rf internal/web/frontend && mkdir -p internal/web/frontend && cp -r web/frontend/build/* internal/web/frontend/"
description = "Copy built frontend assets to Go embed directory"
[tasks.build-server]
depends = ["copy-frontend"]
run = '''
CGO_ENABLED=0 go build \
-ldflags="-w -s -X github.com/IBM/simrun/internal/version.Version=dev -X github.com/IBM/simrun/internal/version.Commit=$(git rev-parse --short HEAD) -X github.com/IBM/simrun/internal/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
-o dist/simrun cmd/simrun/main.go
'''
description = "Build simrun Go binary (includes frontend)"
alias = ["bs"]