From d188fb93066d80c4f6e24860be1e3ed145ce7e5c Mon Sep 17 00:00:00 2001 From: Deda Date: Mon, 18 Mar 2024 11:17:52 +0100 Subject: [PATCH] Fix os checking and rename docker command to package-docker --- .github/workflows/reusable_docker_package.yaml | 2 +- release/package/mgbuild.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable_docker_package.yaml b/.github/workflows/reusable_docker_package.yaml index e5b38df81..920ee791f 100644 --- a/.github/workflows/reusable_docker_package.yaml +++ b/.github/workflows/reusable_docker_package.yaml @@ -86,7 +86,7 @@ jobs: --os ${{ inputs.os }} \ --arch ${{ inputs.arch }} \ --build-type ${{ inputs.build_type }} \ - package-memgraph + package-docker - name: "Copy package" run: | diff --git a/release/package/mgbuild.sh b/release/package/mgbuild.sh index 600d5a7a7..144872a73 100755 --- a/release/package/mgbuild.sh +++ b/release/package/mgbuild.sh @@ -67,6 +67,7 @@ print_help () { echo -e " build-memgraph [OPTIONS] Build memgraph binary inside mgbuild container" echo -e " copy OPTIONS Copy an artifact from mgbuild container to host" echo -e " package-memgraph Create memgraph package from built binary inside mgbuild container" + echo -e " package-docker Create memgraph docker image and pack it as .tar.gz" echo -e " pull Pull mgbuild image from dockerhub" echo -e " push [OPTIONS] Push mgbuild image to dockerhub" echo -e " run [OPTIONS] Run mgbuild container" @@ -357,12 +358,12 @@ package_memgraph() { package_docker() { if [[ "$toolchain_version" == "v4" ]]; then - if [[ "$os" != "debian-11" || "$os" != "debian-11-arm" ]]; then + if [[ "$os" != "debian-11" && "$os" != "debian-11-arm" ]]; then echo -e "Error: When passing '--toolchain v4' the 'docker' command accepts only '--os debian-11' and '--os debian-11-arm'" exit 1 fi else - if [[ "$os" != "debian-12" || "$os" != "debian-12-arm" ]]; then + if [[ "$os" != "debian-12" && "$os" != "debian-12-arm" ]]; then echo -e "Error: When passing '--toolchain v5' the 'docker' command accepts only '--os debian-12' and '--os debian-12-arm'" exit 1 fi @@ -689,7 +690,7 @@ case $command in copy) copy_memgraph $@ ;; - docker) + package-docker) package_docker ;; *)