From db5d1f72bd56eabfc86ba0dba844605f503df0aa Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Mon, 25 Mar 2024 01:05:06 -0500 Subject: [PATCH] chg: Use username as a variable in Makefile --- Dockerfile | 1 - Makefile | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c1fdff..070b64d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,4 +23,3 @@ FROM scratch COPY --from=builder /chhoto-url/target/x86_64-unknown-linux-musl/release/chhoto-url /chhoto-url COPY ./resources /resources ENTRYPOINT ["/chhoto-url"] - diff --git a/Makefile b/Makefile index 457dd34..7b56ab2 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +USERNAME := ${USERNAME} + setup: cargo install cross docker buildx create --use --platform=linux/arm64,linux/amd64 --name multi-platform-builder @@ -9,10 +11,9 @@ build: cross build --release --locked --manifest-path=actix/Cargo.toml --target x86_64-unknown-linux-musl docker: build - docker buildx build --push --tag sintan1729/chhoto-url:dev --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.multiarch . + docker buildx build --push --tag ${USERNAME}/chhoto-url:dev --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.multiarch . clean: cargo clean --manifest-path=actix/Cargo.toml - rm -rf .docker .PHONY: build