1
0
Fork 0
mirror of https://github.com/SinTan1729/chhoto-url synced 2024-12-26 23:58:35 -06:00

chg: Use username as a variable in Makefile

This commit is contained in:
Sayantan Santra 2024-03-25 01:05:06 -05:00
parent e54aa3b33b
commit db5d1f72bd
Signed by: SinTan1729
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 --from=builder /chhoto-url/target/x86_64-unknown-linux-musl/release/chhoto-url /chhoto-url
COPY ./resources /resources COPY ./resources /resources
ENTRYPOINT ["/chhoto-url"] ENTRYPOINT ["/chhoto-url"]

View file

@ -1,3 +1,5 @@
USERNAME := ${USERNAME}
setup: setup:
cargo install cross cargo install cross
docker buildx create --use --platform=linux/arm64,linux/amd64 --name multi-platform-builder 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 cross build --release --locked --manifest-path=actix/Cargo.toml --target x86_64-unknown-linux-musl
docker: build 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: clean:
cargo clean --manifest-path=actix/Cargo.toml cargo clean --manifest-path=actix/Cargo.toml
rm -rf .docker
.PHONY: build .PHONY: build