From 2baa481040f9bdba21f21af5d8ea27519c345ec1 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 24 Mar 2024 23:33:41 -0500 Subject: [PATCH] chg: Change the push script to work with the new setup --- Makefile | 2 +- docker_push_script.sh | 28 +++------------------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 5a2e232..8aa8dac 100644 --- a/Makefile +++ b/Makefile @@ -17,4 +17,4 @@ clean: cargo clean --manifest-path=actix/Cargo.toml rm -rf .docker -.PHONY: build clean docker +.PHONY: build diff --git a/docker_push_script.sh b/docker_push_script.sh index c3d5156..e5d7eba 100755 --- a/docker_push_script.sh +++ b/docker_push_script.sh @@ -1,10 +1,7 @@ #!/bin/env bash if [ "$1" == "dev" ]; then - name="chhoto-url" - docker build -t $name . - docker tag $name sintan1729/$name:dev - docker push sintan1729/$name:dev + docker buildx build --push --tag sintan1729/$name:dev --platform linux/amd64 elif [ "$1" == "release" ]; then v_patch=$(cat actix/Cargo.toml | sed -rn 's/^version = "(.+)"$/\1/p') @@ -12,26 +9,7 @@ elif [ "$1" == "release" ]; then v_major=$(echo $v_minor | sed -rn 's/^(.+)\..+$/\1/p') name="chhoto-url" - - docker build -t $name . - - for tag in $v_major $v_minor $v_patch latest - do - docker tag $name sintan1729/$name:$tag - done - - echo "Do you want to push these to Docker Hub?" - select yn in "Yes" "No"; - do - if [ "$yn"="Yes" ]; then - for tag in $v_major $v_minor $v_patch latest - do - docker push sintan1729/$name:$tag - done - else - echo "Okay! Not pushing." - fi - break - done + docker buildx build --push --tag sintan1729/$name:$v_major --tag sintan1729/$v_minor: \ + --tag sintan1729/$name:$v_patch --tag sintan1729/$name:latest --platform linux/amd64,linux/arm64 fi