-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 1.24 KB
/
Copy pathMakefile
File metadata and controls
55 lines (43 loc) · 1.24 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
.PHONY: build test e2e clean release build-debian build-alpine build-ubuntu
# Default target
all: build test
# Build
build:
cargo build --release
# Unit tests
test:
cargo test --all --no-fail-fast
# E2E tests (requires release build)
e2e: build
chmod +x tests/e2e.sh
./tests/e2e.sh
# Full check: unit + e2e
check-all: test e2e
# Clean
clean:
cargo clean
rm -f /tmp/rune_*
# Release build with optimizations
release:
cargo build --release
strip target/release/rune
@echo "Binary: target/release/rune ($$(ls -lh target/release/rune | awk '{print $$5}'))"
# Docker builds
build-debian:
docker build -f docker/Dockerfile.debian -t rune:debian .
build-alpine:
docker build -f docker/Dockerfile.alpine -t rune:alpine .
build-ubuntu:
docker build -f docker/Dockerfile.ubuntu -t rune:ubuntu .
# Install to ~/.local/bin
install: release
mkdir -p ~/.local/bin
cp target/release/rune ~/.local/bin/rune
@echo "Installed to ~/.local/bin/rune"
# Create Concourse symlinks
install-concourse: release
mkdir -p /opt/resource
ln -sf $$(realpath target/release/rune) /opt/resource/check
ln -sf $$(realpath target/release/rune) /opt/resource/in
ln -sf $$(realpath target/release/rune) /opt/resource/out
@echo "Concourse symlinks created in /opt/resource/"