rockhopper 0.0.20

metapackage generator
Documentation
.POSIX:
.SILENT:
.PHONY: \
	all \
	audit \
	build \
	cargo-check \
	clean \
	clean-cargo \
	clean-examples \
	clean-go \
	clean-packages \
	clean-ports \
	clean-rust \
	clean-shell \
	clippy \
	crit \
	doc \
	docker-build \
	docker-build-alpine-linux \
	docker-build-fedora \
	docker-build-freebsd \
	docker-build-macos \
	docker-build-netbsd \
	docker-build-ubuntu \
	docker-build-windows \
	docker-push \
	docker-push-alpine-linux \
	docker-push-fedora \
	docker-push-freebsd \
	docker-push-macos \
	docker-push-netbsd \
	docker-push-ubuntu \
	docker-push-windows \
	docker-test \
	docker-test-alpine-linux \
	docker-test-fedora \
	docker-test-freebsd \
	docker-test-macos \
	docker-test-netbsd \
	docker-test-ubuntu \
	docker-test-windows \
	install \
	lint \
	package \
	port \
	publish \
	rustfmt \
	test \
	test-go \
	test-rust \
	test-shell \
	uninstall \
	upload
.IGNORE: \
	clean \
	clean-cargo \
	clean-example \
	clean-packages \
	clean-ports

VERSION=0.0.20
BANNER=rockhopper-$(VERSION)

all: install

build: lint
	cargo build --release

cargo-check:
	cargo check

clean: clean-cargo clean-examples clean-packages clean-ports

clean-cargo:
	cargo clean

clean-examples: clean-go clean-shell

clean-go:
	rm -rf examples/go/.rockhopper

clean-packages:
	rm -rf .rockhopper

clean-ports:
	crit -c

clean-rust:
	rm -rf examples/rust/.rockhopper

clean-shell:
	rm -rf examples/shell/.rockhopper

clippy:
	cargo clippy

crit:
	crit -b $(BANNER)

doc:
	cargo doc

docker-build: \
	docker-build-alpine-linux \
	docker-build-fedora \
	docker-build-freebsd \
	docker-build-macos \
	docker-build-netbsd \
	docker-build-ubuntu \
	docker-build-windows

docker-build-alpine-linux:
	sh -c "cd docker/alpine-linux && tuggy -t n4jm4/rockhopper:alpine-linux --load"

docker-build-fedora:
	sh -c "cd docker/fedora && tuggy -t n4jm4/rockhopper:fedora --load"

docker-build-freebsd:
	sh -c "cd docker/freebsd && tuggy -t n4jm4/rockhopper:freebsd --load"

docker-build-macos:
	sh -c "cd docker/macos && tuggy -t n4jm4/rockhopper:macos --load"

docker-build-netbsd:
	sh -c "cd docker/netbsd && tuggy -t n4jm4/rockhopper:netbsd --load"

docker-build-ubuntu:
	sh -c "cd docker/ubuntu && tuggy -t n4jm4/rockhopper:ubuntu --load"

docker-build-windows:
	sh -c "cd docker/windows && tuggy -t n4jm4/rockhopper:windows --load"

docker-push: \
	docker-push-alpine-linux \
	docker-push-fedora \
	docker-push-freebsd \
	docker-push-macos \
	docker-push-netbsd \
	docker-push-ubuntu \
	docker-push-windows

docker-push-alpine-linux:
	sh -c "cd docker/alpine-linux && tuggy -t n4jm4/rockhopper:alpine-linux -a n4jm4/rockhopper:$(VERSION)-alpine-linux-3.23,n4jm4/rockhopper:$(VERSION)-alpine-linux,n4jm4/rockhopper:alpine-linux-3.23 --push"

docker-push-fedora:
	sh -c "cd docker/fedora && tuggy -t n4jm4/rockhopper:fedora -a n4jm4/rockhopper:$(VERSION)-fedora-43,n4jm4/rockhopper:$(VERSION)-fedora,n4jm4/rockhopper:fedora-43 --push"

docker-push-freebsd:
	sh -c "cd docker/freebsd && tuggy -t n4jm4/rockhopper:freebsd -a n4jm4/rockhopper:$(VERSION)-freebsd --push"

docker-push-macos:
	sh -c "cd docker/macos && tuggy -t n4jm4/rockhopper:macos -a n4jm4/rockhopper:$(VERSION)-macos --push"

docker-push-netbsd:
	sh -c "cd docker/netbsd && tuggy -t n4jm4/rockhopper:netbsd -a n4jm4/rockhopper:$(VERSION)-netbsd --push"

docker-push-ubuntu:
	sh -c "cd docker/ubuntu && tuggy -t n4jm4/rockhopper:ubuntu -a n4jm4/rockhopper:$(VERSION)-ubuntu-24.04,n4jm4/rockhopper:$(VERSION)-ubuntu-noble,n4jm4/rockhopper:$(VERSION)-ubuntu,n4jm4/rockhopper:ubuntu-24.04,n4jm4/rockhopper:ubuntu-noble --push"

docker-push-windows:
	sh -c "cd docker/windows && tuggy -t n4jm4/rockhopper:windows -a n4jm4/rockhopper:$(VERSION)-windows --push"

docker-test: \
	docker-test-alpine-linux \
	docker-test-fedora \
	docker-test-freebsd \
	docker-test-macos \
	docker-test-netbsd \
	docker-test-ubuntu \
	docker-test-windows

docker-test-alpine-linux:
	sh -c "cd docker/alpine-linux && tuggy -t n4jm4/rockhopper:test-alpine-linux --load"
	sh -c "cd docker/alpine-linux && tuggy -t n4jm4/rockhopper:test-alpine-linux --push"

docker-test-fedora:
	sh -c "cd docker/fedora && tuggy -t n4jm4/rockhopper:test-fedora --load"
	sh -c "cd docker/fedora && tuggy -t n4jm4/rockhopper:test-fedora --push"

docker-test-freebsd:
	sh -c "cd docker/freebsd && tuggy -t n4jm4/rockhopper:test-freebsd --load"
	sh -c "cd docker/freebsd && tuggy -t n4jm4/rockhopper:test-freebsd --push"

docker-test-macos:
	sh -c "cd docker/macos && tuggy -t n4jm4/rockhopper:test-macos --load"
	sh -c "cd docker/macos && tuggy -t n4jm4/rockhopper:test-macos --push"

docker-test-netbsd:
	sh -c "cd docker/netbsd && tuggy -t n4jm4/rockhopper:test-netbsd --load"
	sh -c "cd docker/netbsd && tuggy -t n4jm4/rockhopper:test-netbsd --push"

docker-test-ubuntu:
	sh -c "cd docker/ubuntu && tuggy -t n4jm4/rockhopper:test-ubuntu --load"
	sh -c "cd docker/ubuntu && tuggy -t n4jm4/rockhopper:test-ubuntu --push"

docker-test-windows:
	sh -c "cd docker/windows && tuggy -t n4jm4/rockhopper:test-windows --load"
	sh -c "cd docker/windows && tuggy -t n4jm4/rockhopper:test-windows --push"

install:
	cargo install --force --path .

lint: \
	cargo-check \
	clippy \
	doc \
	rustfmt

package:
	rockhopper

port:
	./port -C .crit/bin -a rockhopper $(BANNER)

publish:
	cargo publish

rustfmt:
	cargo fmt

test: test-go test-rust test-shell

test-go:
	sh -c "cd examples/go && rockhopper && tree .rockhopper/artifacts"

test-rust:
	sh -c "cd examples/rust && rockhopper && tree .rockhopper/artifacts"

test-shell:
	sh -c "cd examples/shell && rockhopper && tree .rockhopper/artifacts"

uninstall:
	cargo uninstall rockhopper

upload:
	./upload