forked from unravel-team/DSCloj
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (57 loc) · 2.16 KB
/
Makefile
File metadata and controls
69 lines (57 loc) · 2.16 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
68
69
.PHONY: help repl nrepl test test-ci test-integration coverage lint clean build install compile deploy
help:
@echo "Available targets:"
@echo " repl - Start a Clojure REPL"
@echo " nrepl - Start an nREPL server on port 7888"
@echo " test - Run tests"
@echo " test-ci - Run tests with documentation reporter"
@echo " test-integration - Run integration tests (requires OPENAI_API_KEY)"
@echo " coverage - Run tests with coverage report"
@echo " lint - Run clj-kondo linter"
@echo " compile - Compile and check syntax"
@echo " clean - Remove target directory"
@echo " build - Build the project"
@echo " install - Install to local Maven repository"
@echo " deploy - Deploy to Clojars (requires CLOJARS_USERNAME and CLOJARS_PASSWORD)"
repl:
clojure -M:repl
nrepl:
@echo "Starting nREPL server on port 7888..."
clojure -M:repl -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' --port 7888
test:
clojure -M:test -m kaocha.runner
test-integration:
@echo "Running integration tests (requires OPENAI_API_KEY)..."
clojure -M:test -m kaocha.runner --focus-meta :integration
coverage:
clojure -M:test:coverage
lint:
clojure -M:kondo --lint src test
compile:
@echo "Compiling and checking syntax..."
clojure -M -e "(require 'dscloj.core) (println \"✓ Code compiles successfully\")"
clean:
rm -rf target .cpcache
build:
clojure -T:build jar
install:
clojure -T:build install
deploy:
@echo "🚀 Deploying DSCloj to Clojars..."
@if [ -z "$$CLOJARS_USERNAME" ]; then \
echo "❌ Error: CLOJARS_USERNAME environment variable is not set"; \
exit 1; \
fi
@if [ -z "$$CLOJARS_PASSWORD" ]; then \
echo "❌ Error: CLOJARS_PASSWORD environment variable is not set"; \
exit 1; \
fi
@echo "✅ Environment variables are set"
@echo "🧪 Running tests..."
@$(MAKE) test
@echo "🔨 Building JAR..."
@clojure -T:build jar
@echo "📦 Deploying version 0.1.0-alpha.1 to Clojars..."
@clojure -X:deploy :artifact '"target/dscloj-0.1.0-alpha.1.jar"'
@echo "✅ Deployment complete!"
@echo "Verify at: https://clojars.org/tech.unravel/DSClj"