Skip to content

Commit 9f2cab1

Browse files
committed
Update Makefile
1 parent 9bc4617 commit 9f2cab1

File tree

1 file changed

+45
-9
lines changed

1 file changed

+45
-9
lines changed

Makefile

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,52 @@
1-
CONTAINER_NAME := "splunk"
1+
#
2+
# Conveniences for splunk-sdk development
3+
#
4+
5+
# DEV ENVIRONMENT
6+
7+
# https://docs.astral.sh/uv/reference/cli/#uv-run--upgrade
8+
# --no-config is used to skip all the internal Splunk package indexes
9+
.PHONY: uv-sync
10+
uv-sync:
11+
@echo "[splunk-sdk] ---"
12+
@echo "[splunk-sdk] Make sure to run this only in the repo root!"
13+
uv sync --all-extras --no-config
14+
pre-commit install
15+
16+
.PHONY: uv-upgrade
17+
uv-upgrade:
18+
@echo "[splunk-sdk] ---"
19+
@echo "[splunk-sdk] Make sure to run this only in the repo root!"
20+
uv sync --all-extras --upgrade --no-config
21+
pre-commit autoupdate
22+
23+
# SDK RELEASE
224

325
.PHONY: docs
426
docs:
5-
@make -C ./docs html
27+
make -C ./docs html
628

729
.PHONY: test
830
test:
9-
@python -m pytest ./tests
31+
python -m pytest ./tests
1032

1133
.PHONY: test-unit
1234
test-unit:
13-
@python -m pytest ./tests/unit
35+
python -m pytest ./tests/unit
1436

1537
.PHONY: test-integration
1638
test-integration:
17-
@python -m pytest ./tests/integration ./tests/system
39+
python -m pytest ./tests/integration ./tests/system
40+
41+
.PHONY: test-ai
42+
test-ai:
43+
python -m pytest ./tests/integration/ai ./tests/unit/ai
44+
45+
# DOCKER
1846

1947
.PHONY: docker-up
2048
docker-up:
21-
@docker-compose up -d
49+
docker-compose up -d
2250

2351
.PHONY: docker-ensure-up
2452
docker-ensure-up:
@@ -35,14 +63,22 @@ docker-start: docker-up docker-ensure-up
3563

3664
.PHONY: docker-down
3765
docker-down:
38-
@docker-compose stop
66+
docker-compose stop
3967

4068
.PHONY: docker-restart
4169
docker-restart: docker-down docker-start
4270

4371
.PHONY: docker-remove
4472
docker-remove:
45-
@docker-compose rm -f -s
73+
docker-compose rm -f -s
4674

4775
.PHONY: docker-refresh
48-
docker-refresh: docker-remove docker-start
76+
docker-refresh: docker-remove docker-start
77+
78+
.PHONY: docker-splunk-restart
79+
docker-splunk-restart:
80+
docker exec -it splunk-instance sh -c '/opt/splunk/bin/splunk restart'
81+
82+
.PHONY: docker-tail-python-log
83+
docker-tail-python-log:
84+
docker exec splunk-instance tail /opt/splunk/var/log/splunk/python.log

0 commit comments

Comments
 (0)