From 58180364b4ca58a5e346baf470e95fddf919c62c Mon Sep 17 00:00:00 2001 From: Scott Yeager Date: Thu, 19 Jun 2025 22:43:11 -0700 Subject: [PATCH] Fetch deps on first build --- Makefile | 7 +++++-- README.md | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c745877..f360b3d 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,12 @@ PLUGIN_NAME = mycelium-cni CNI_PLUGINS_DIR = /opt/cni/bin CNI_CONFIG_DIR = /etc/cni/net.d -.PHONY: build install clean test +.PHONY: build install clean test deps -build: +deps: + go mod tidy + +build: deps go build -o $(PLUGIN_NAME) . install: build diff --git a/README.md b/README.md index 183bea7..2ddf08d 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,15 @@ This CNI plugin integrates with the Mycelium overlay network to provide IPv6 con ## Installation ```bash -# Build the plugin +# Download dependencies and build the plugin make build # Install plugin and configuration make install ``` +> **Note**: The first build will download Go dependencies automatically via `go mod tidy`. + ## Configuration The plugin uses a CNI configuration file (`10-mycelium.conflist`) that specifies the Mycelium interface name: @@ -86,7 +88,7 @@ sudo systemctl enable --now mycelium On each Kubernetes node: ```bash -# Build and install the plugin +# Download dependencies, build and install the plugin make build sudo make install