Add Debian package building, add manpage, release v1.0.0
This commit is contained in:
19
Makefile
19
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: build clean wipe test help
|
||||
.PHONY: build clean wipe test help sync-version pkg-deb
|
||||
|
||||
# Default target
|
||||
all: build
|
||||
@@ -27,6 +27,8 @@ clean:
|
||||
@echo "Cleaning build artifacts..."
|
||||
rm -f s3-genindex
|
||||
rm -f coverage.out coverage.html
|
||||
rm -rf debian/s3-genindex debian/files debian/*.substvars debian/debhelper-build-stamp
|
||||
rm -rf debian/.gocache debian/go
|
||||
find . -name index.html -delete
|
||||
@echo "Clean complete"
|
||||
|
||||
@@ -73,6 +75,19 @@ bench:
|
||||
@echo "Running benchmarks..."
|
||||
go test -bench=. ./...
|
||||
|
||||
# Sync version from debian/changelog to source code
|
||||
sync-version:
|
||||
@echo "Syncing version..."
|
||||
@version=$$(head -1 debian/changelog | sed -n 's/.*(\([^)]*\)).*/\1/p'); \
|
||||
sed -i "s/const Version = .*/const Version = \"$$version\"/" cmd/s3-genindex/main.go; \
|
||||
echo "Updated version to $$version"
|
||||
|
||||
# Build Debian package
|
||||
pkg-deb: sync-version
|
||||
@echo "Building Debian package..."
|
||||
fakeroot dpkg-buildpackage -us -uc -b
|
||||
@echo "Debian package build complete"
|
||||
|
||||
# Show help
|
||||
help:
|
||||
@echo "Available targets:"
|
||||
@@ -87,4 +102,6 @@ help:
|
||||
@echo " lint - Lint code (requires golangci-lint)"
|
||||
@echo " check - Run fmt, vet, lint, and test"
|
||||
@echo " bench - Run benchmarks"
|
||||
@echo " sync-version - Sync version from debian/changelog to source"
|
||||
@echo " pkg-deb - Build Debian package"
|
||||
@echo " help - Show this help message"
|
||||
|
||||
Reference in New Issue
Block a user