Skip to content

Commit 16be4a9

Browse files
committed
feat(makefile): add uninstall target
1 parent db17ceb commit 16be4a9

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ MANOUT := $(DOCDIR)/man
1818
GO_TAGS ?=
1919

2020
.PHONY: build install-binary install-service reload-service run dev setup-precommit \
21-
docs install-man uninstall-man install
21+
docs install-man uninstall-man install uninstall
2222

2323
# Generate Markdown + man pages from cmd/ginkgo-cli/doc_gen.go (build-tagged //go:build ignore)
2424
docs:
@@ -74,6 +74,15 @@ reload-service:
7474
# one-shot local install: binary + man
7575
install: build install-binary install-man
7676

77+
uninstall: uninstall-man
78+
@echo "Removing binary symlinks..."
79+
@rm -f $(BIN_SYMLINK) $(BIN_DAEMON_SYMLINK)
80+
@echo "Removing systemd user service symlink..."
81+
@rm -f $(SERVICE_DIR)/ginkgo.service
82+
@echo "Reloading systemd user daemon..."
83+
-@command -v systemctl >/dev/null 2>&1 && systemctl --user daemon-reload || true
84+
@echo "Uninstall complete"
85+
7786
run: build install-binary install-service reload-service
7887

7988
dev: run

0 commit comments

Comments
 (0)