22UID := $(shell id -u)
33GID := $(shell id -g)
44
5- .PHONY : check-clean-git-history check-conventional-commits-linting check-rust-formatting check-python-formatting check-yaml-formatting fix-rust-formatting fix-python-formatting fix-yaml-formatting check-rust-linting check-github-actions-workflows-linting compile unit-test static-binary-test end-to-end-test publish-binary publish-crate
5+ .PHONY : check-clean-git-history check-conventional-commits-linting check-rust-formatting check-python-formatting check-yaml-formatting fix-rust-formatting fix-python-formatting fix-yaml-formatting check-rust-linting check-github-actions-workflows-linting compile unit-test end-to-end-test publish-binary publish-crate dogfood-docker publish-docker
66
77# renovate: depName=ghcr.io/developerc286/clean_git_history
88CLEAN_GIT_HISTORY_VERSION =1.0.4@sha256:5783341a3377a723e409e72b9ec0826a75ba944288d030978355de05ef65b186
@@ -27,7 +27,7 @@ SHFMT_VERSION=v3.11.0-alpine@sha256:394d755b6007056a2e6d7537ccdbdcfca01b9855ba91
2727
2828check-shell-formatting :
2929 docker pull mvdan/shfmt:$(SHFMT_VERSION )
30- docker run --rm -v $(PWD ) :/workspace -w /workspace -u $(UID ) :$(GID ) mvdan/shfmt:$(SHFMT_VERSION ) --simplify --diff ci/*
30+ docker run --rm -v $(PWD ) :/workspace -w /workspace -u $(UID ) :$(GID ) mvdan/shfmt:$(SHFMT_VERSION ) --simplify --diff ci/*
3131
3232check-python-formatting :
3333 docker build -t check-python-formatting -f ci/check-python-formatting.Dockerfile .
@@ -43,7 +43,7 @@ fix-rust-formatting:
4343
4444fix-shell-formatting :
4545 docker pull mvdan/shfmt:$(SHFMT_VERSION )
46- docker run --rm -v $(PWD ) :/workspace -w /workspace -u $(UID ) :$(GID ) mvdan/shfmt:$(SHFMT_VERSION ) --simplify --write ci/*
46+ docker run --rm -v $(PWD ) :/workspace -w /workspace -u $(UID ) :$(GID ) mvdan/shfmt:$(SHFMT_VERSION ) --simplify --write ci/*
4747
4848fix-python-formatting :
4949 docker build -t fix-python-formatting -f ci/fix-python-formatting.Dockerfile .
@@ -75,18 +75,25 @@ unit-test:
7575 docker build -t unit-test -f ci/unit-test.Dockerfile .
7676 docker run --rm -v $(PWD ) :/workspace -u $(UID ) :$(GID ) unit-test
7777
78- static-binary-test : compile
79- docker run --rm -v $(PWD ) :/workspace -u $(UID ) :$(GID ) compile --release
80- ./target/x86_64-unknown-linux-musl/release/conventional_commits_next_version --help
81-
8278end-to-end-test : compile
8379 docker build -t end-to-end-test -f ci/end-to-end-test.Dockerfile .
8480 docker run --rm -v $(PWD ) :/workspace -u $(UID ) :$(GID ) end-to-end-test
8581
86- publish-binary : static-binary-test
82+ release :
83+ docker build -t compile -f ci/compile.Dockerfile .
84+ docker run --rm -v $(PWD ) :/workspace -u $(UID ) :$(GID ) compile --release
85+
86+ publish-binary : release
8787 docker build -t publish-binary -f ci/publish-binary.Dockerfile .
8888 docker run --rm -v $(PWD ) :/workspace -u $(UID ) :$(GID ) -e GH_TOKEN publish-binary $(RELEASE )
8989
9090publish-crate :
9191 docker build -t publish-crate -f ci/publish-crate.Dockerfile .
9292 docker run --rm -v $(PWD ) :/workspace -u $(UID ) :$(GID ) -e CARGO_REGISTRY_TOKEN publish-crate
93+
94+ dogfood-docker : release
95+ docker build -t conventional-commits-linter -f Dockerfile .
96+ docker run --rm -v $(PWD ) :/workspace -u $(UID ) :$(GID ) conventional-commits-linter --from-version v1.0.0 $(FROM )
97+
98+ publish-docker : release
99+ ./ci/publish-docker.sh ${RELEASE}
0 commit comments