Skip to content

Commit 052910f

Browse files
machado144claude
andcommitted
Initial implementation of pipekit CLI
CI/CD pipeline Swiss Army knife with 12 command groups: env, mask, transform, summary, assert, matrix, notify, wait, diff, version, retry, cache-key. 52 unit tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 parents  commit 052910f

45 files changed

Lines changed: 5513 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: '1.24'
24+
25+
- name: Run tests
26+
run: go test ./...
27+
28+
- name: Run GoReleaser
29+
uses: goreleaser/goreleaser-action@v6
30+
with:
31+
distribution: goreleaser
32+
version: latest
33+
args: release --clean
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dist/
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
*.test
8+
*.out
9+
.env

.goreleaser.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# GoReleaser configuration for pipekit
2+
# See https://goreleaser.com/customization/ for more details
3+
4+
before:
5+
hooks:
6+
- go mod tidy
7+
8+
builds:
9+
- env:
10+
- CGO_ENABLED=0
11+
goos:
12+
- linux
13+
- darwin
14+
- windows
15+
goarch:
16+
- amd64
17+
- arm64
18+
- 386
19+
- arm
20+
ldflags:
21+
- -s -w
22+
- -X main.Version={{.Version}}
23+
- -X main.BuildTime={{.Date}}
24+
- -X main.GitCommit={{.FullCommit}}
25+
binary: pipekit-{{.OS}}-{{.Arch}}
26+
ignore:
27+
- goos: windows
28+
goarch: arm
29+
30+
archives:
31+
- format: tar.gz
32+
name_template: "pipekit-{{.OS}}-{{.Arch}}"
33+
files:
34+
- README.md
35+
- LICENSE
36+
format_overrides:
37+
- goos: windows
38+
format: zip
39+
name_template: "pipekit-{{.OS}}-{{.Arch}}"
40+
41+
checksum:
42+
name_template: 'checksums.txt'
43+
44+
snapshot:
45+
name_template: "{{ incpatch .Version }}-next"
46+
47+
changelog:
48+
sort: asc
49+
filters:
50+
exclude:
51+
- '^docs:'
52+
- '^test:'
53+
54+
release:
55+
github:
56+
owner: AxeForging
57+
name: pipekit
58+
draft: false
59+
prerelease: auto
60+
name_template: "Release {{ .Tag }}"
61+
footer: |
62+
## Installation
63+
64+
### Linux/macOS (AMD64)
65+
```bash
66+
curl -L https://github.com/AxeForging/pipekit/releases/download/{{ .Tag }}/pipekit-linux-amd64.tar.gz -o pipekit-linux-amd64.tar.gz
67+
tar -xvf pipekit-linux-amd64.tar.gz pipekit-linux-amd64
68+
chmod +x pipekit-linux-amd64
69+
sudo mv pipekit-linux-amd64 /usr/local/bin/pipekit
70+
```
71+
72+
### Linux/macOS (ARM64)
73+
```bash
74+
curl -L https://github.com/AxeForging/pipekit/releases/download/{{ .Tag }}/pipekit-linux-arm64.tar.gz -o pipekit-linux-arm64.tar.gz
75+
tar -xvf pipekit-linux-arm64.tar.gz pipekit-linux-arm64
76+
chmod +x pipekit-linux-arm64
77+
sudo mv pipekit-linux-arm64 /usr/local/bin/pipekit
78+
```
79+
80+
### Windows
81+
```powershell
82+
Invoke-WebRequest -Uri https://github.com/AxeForging/pipekit/releases/download/{{ .Tag }}/pipekit-windows-amd64.zip -OutFile pipekit-windows-amd64.zip
83+
Expand-Archive -Path pipekit-windows-amd64.zip -DestinationPath .
84+
Move-Item -Path pipekit-windows-amd64/pipekit-windows-amd64.exe -Destination pipekit.exe
85+
```
86+
87+
### From Source
88+
```bash
89+
go install github.com/AxeForging/pipekit@{{ .Tag }}
90+
```

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 AxeForging
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
.PHONY: all build clean test lint tidy version release-check
2+
3+
GOOS_ARCH := linux/amd64 linux/arm64 linux/386 linux/arm darwin/amd64 darwin/arm64 windows/amd64 windows/arm64 windows/386
4+
DIST_DIR := dist
5+
6+
# Version information - can be overridden by environment variable
7+
ifeq ($(origin VERSION), environment)
8+
# VERSION is set from environment
9+
else
10+
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
11+
endif
12+
13+
BUILD_TIME := $(shell date -u '+%Y-%m-%d_%H:%M:%S')
14+
GIT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
15+
16+
# Build flags
17+
LDFLAGS := -ldflags="-s -w -X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME) -X main.GitCommit=$(GIT_COMMIT)"
18+
19+
all: build
20+
21+
build:
22+
@echo "Building pipekit..."
23+
@echo "Version: $(VERSION)"
24+
@echo "Build time: $(BUILD_TIME)"
25+
@echo "Git commit: $(GIT_COMMIT)"
26+
@mkdir -p $(DIST_DIR)
27+
CGO_ENABLED=0 go build $(LDFLAGS) -o $(DIST_DIR)/pipekit .
28+
@echo "Build complete: $(DIST_DIR)/pipekit"
29+
30+
build-all:
31+
@echo "Building binaries for all platforms..."
32+
@mkdir -p $(DIST_DIR)
33+
@for t in $(GOOS_ARCH); do \
34+
os=$${t%/*}; arch=$${t#*/}; \
35+
bin_name=pipekit-$${os}-$${arch}; \
36+
if [ "$$os" = "windows" ]; then bin_name="$${bin_name}.exe"; fi; \
37+
bin_path=$(DIST_DIR)/$$bin_name; \
38+
echo " Building for $$os/$$arch..."; \
39+
CGO_ENABLED=0 GOOS=$$os GOARCH=$$arch go build $(LDFLAGS) -o $$bin_path .; \
40+
done
41+
@echo "Build complete. Binaries in $(DIST_DIR)/"
42+
43+
test:
44+
@echo "Running tests..."
45+
go test ./... -v
46+
@echo "All tests passed."
47+
48+
lint:
49+
@echo "Running linter..."
50+
golangci-lint run --timeout=5m
51+
52+
tidy:
53+
go mod tidy
54+
55+
clean:
56+
@echo "Cleaning build artifacts..."
57+
rm -rf $(DIST_DIR)
58+
@echo "Clean complete."
59+
60+
version:
61+
@echo "Current version: $(VERSION)"
62+
@echo "Build time: $(BUILD_TIME)"
63+
@echo "Git commit: $(GIT_COMMIT)"
64+
65+
tag:
66+
@if [ "$(VERSION)" = "dev" ]; then \
67+
echo "Error: Cannot tag dev version. Please set VERSION environment variable."; \
68+
exit 1; \
69+
fi
70+
@echo "Creating git tag: $(VERSION)"
71+
git tag -a $(VERSION) -m "Release $(VERSION)"
72+
@echo "Tag created. Push with: git push origin $(VERSION)"
73+
74+
release-check: build
75+
@echo "Running tests..."
76+
go test ./...
77+
@echo "All tests passed. Ready for release $(VERSION)"
78+
79+
ci: tidy lint test build

0 commit comments

Comments
 (0)