rockhopper 0.0.18

metapackage generator
Documentation
.POSIX:
.SILENT:
.PHONY: \
	all \
	audit \
	build \
	cargo-check \
	clean \
	clean-cargo \
	clean-example \
	clean-packages \
	clean-ports \
	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-push \
	docker-push-alpine-linux \
	docker-push-fedora \
	docker-push-freebsd \
	docker-push-macos \
	docker-push-netbsd \
	docker-push-ubuntu \
	docker-test \
	docker-test-alpine-linux \
	docker-test-fedora \
	docker-test-freebsd \
	docker-test-macos \
	docker-test-netbsd \
	docker-test-ubuntu \
	install \
	lint \
	package \
	port \
	publish \
	rustfmt \
	test \
	uninstall \
	upload
.IGNORE: \
	clean \
	clean-cargo \
	clean-example \
	clean-packages \
	clean-ports

VERSION=0.0.18
BANNER=rockhopper-$(VERSION)

all: install

build: lint
	cargo build --release

cargo-check:
	cargo check

clean: clean-cargo clean-example clean-packages clean-ports

clean-cargo:
	cargo clean

clean-example:
	rm -rf example/sh/.rockhopper

clean-packages:
	rm -rf .rockhopper

clean-ports:
	crit -c

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-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-push: \
	docker-push-alpine-linux \
	docker-push-fedora \
	docker-push-freebsd \
	docker-push-macos \
	docker-push-netbsd \
	docker-push-ubuntu

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-test: \
	docker-test-alpine-linux \
	docker-test-fedora \
	docker-test-freebsd \
	docker-test-macos \
	docker-test-netbsd \
	docker-test-ubuntu

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"

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:
	sh -c "cd example/sh && rockhopper && tree .rockhopper/artifacts"

uninstall:
	cargo uninstall rockhopper

upload:
	./upload