chg: Use username as a variable in Makefile

This commit is contained in:
SinTan1729 2024-03-25 01:05:06 -05:00
parent e54aa3b33b
commit db5d1f72bd
No known key found for this signature in database
GPG Key ID: EB3E68BFBA25C85F
2 changed files with 3 additions and 3 deletions

View File

@ -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"]

View File

@ -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