From b9fb8143194758c99983b00a4cf984caa5a489dc Mon Sep 17 00:00:00 2001 From: yxxhero Date: Sat, 24 Jan 2026 10:57:57 +0800 Subject: [PATCH] Add build instructions and installation guide Fixes #65 - Add build targets to Makefile and Installation section to README with build instructions, prerequisites, and usage examples. Signed-off-by: yxxhero --- Makefile | 8 ++++++++ README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/Makefile b/Makefile index 105a0c5..1ccb0bc 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,14 @@ test: test/verbose: RETAIN_TEMP_DIR=1 go test -v ./... +.PHONY: build +build: + go build -o chartify ./cmd/chartify + +.PHONY: build/chartreposerver +build/chartreposerver: + go build -o chartreposerver ./cmd/chartreposerver + .PHONY: act act: act diff --git a/README.md b/README.md index 3deafac..e64acb0 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,40 @@ `chartify` is intended to be run immediately before running `helm upgrade --install`. For example, instead of forking a helm chart, you should be able to prepend a `chartify` step into your deployment job in your CD pipeline. `chartify` isn't intended to create a fork of a chart. The output of `chartify` is a helm chart that is pre-rendered with all the helm values provided to `chartify`. +## Installation + +### Build from source + +Build the CLI tool: + +```bash +make build +``` + +Or build manually: + +```bash +go build -o chartify ./cmd/chartify +``` + +Build the chart repo server: + +```bash +make build/chartreposerver +``` + +Or build manually: + +```bash +go build -o chartreposerver ./cmd/chartreposerver +``` + +### Prerequisites + +- Go 1.25.4+ +- Helm v4.1.0 (helm command) +- Kustomize v5.8.0+ (kustomize command, optional, for kustomize integration) + ## CLI Beyond it's usage with helmfile, it also provides a basic CLI application that can be run independently. @@ -16,4 +50,15 @@ The simplest usage of the command is: $ chartify $RELEASE $CHART -o $OUTPUT_DIR ``` +Examples: + +```bash +# Build and run with a Helm chart +make build +./chartify -o /tmp/output test-release testdata/charts/log + +# Build and run with Kubernetes manifests +./chartify -o /tmp/output test-release testdata/kube_manifest_yml +``` + See `chartify -h` or `go run ./cmd/chartify -h` for more information.