-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
31 lines (27 loc) · 1.02 KB
/
Makefile
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
katana:
katana --disable-fee --allowed-origins "*" --invoke-max-steps 4294967295
setup:
@./scripts/setup.sh
init:
@mkdir -p .git/hooks
@touch .git/hooks/pre-push
@echo '#!/bin/bash' > .git/hooks//pre-push
@echo 'echo "Running pre-push hook..."' >> .git/hooks/pre-push
@echo 'echo "Executing sozo test..."' >> .git/hooks/pre-push
@echo '' >> .git/hooks/pre-push
@echo '# Run sozo test' >> .git/hooks/pre-push
@echo 'if ! sozo test; then' >> .git/hooks/pre-push
@echo ' echo "❌ sozo test failed. Push aborted."' >> .git/hooks/pre-push
@echo ' exit 1' >> .git/hooks/pre-push
@echo 'fi' >> .git/hooks/pre-push
@echo '' >> .git/hooks/pre-push
@echo 'echo "✅ sozo test passed. Proceeding with push..."' >> .git/hooks/pre-push
@echo 'exit 0' >> .git/hooks/pre-push
@chmod +x .git/hooks/pre-push
@echo "Git hooks initialized successfully!"
# Define tasks that are not real files
.PHONY: katana setup torii init
# Catch-all rule for undefined commands
%:
@echo "Error: Command '$(MAKECMDGOALS)' is not defined."
@exit 1