-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
46 lines (37 loc) · 1.52 KB
/
Copy pathJustfile
File metadata and controls
46 lines (37 loc) · 1.52 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
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
default:
@just --list
# Run all tests
test: test-go test-swift
test-go:
go test ./...
test-swift:
cd tsmd && swift test
# Build both binaries into ./dist/bin/. VERSION is stamped into
# `tsm/cmd.Version` via ldflag and shown by `tsm version` / `tsm status`.
# Defaults to "dev" for local builds; `package` propagates the real tag.
build VERSION="dev": clean
mkdir -p dist/bin
go build -trimpath -ldflags="-s -w -X 'tsm/cmd.Version={{VERSION}}'" -o dist/bin/tsm .
cd tsmd && swift build -c release
cp tsmd/.build/release/tsmd dist/bin/tsmd
chmod +x dist/bin/tsm dist/bin/tsmd
clean:
rm -rf dist
# Package binaries into a tarball + checksums (VERSION is bare, no leading "v")
package VERSION: (build "v" + VERSION)
mkdir -p dist/release
tar -C dist/bin -czf dist/release/tsm_{{VERSION}}_darwin_arm64.tar.gz tsm tsmd
cd dist/release && shasum -a 256 *.tar.gz > checksums.txt
@echo "✓ packaged dist/release/tsm_{{VERSION}}_darwin_arm64.tar.gz"
# Build + package only — no GitHub release, no npm publish
release-dryrun VERSION: (package VERSION)
@echo "✓ dry-run artifacts ready in dist/release/ for v{{VERSION}}"
@ls -lh dist/release/
# Create the GitHub Release and upload artifacts (requires `gh auth login`)
release VERSION: (package VERSION)
gh release create v{{VERSION}} \
dist/release/tsm_{{VERSION}}_darwin_arm64.tar.gz \
dist/release/checksums.txt \
--title "v{{VERSION}}" \
--generate-notes