From 82cc7cfec69d553f31a4021f76c2b29bb945af14 Mon Sep 17 00:00:00 2001 From: Moncef AOUDIA Date: Fri, 15 Dec 2023 19:00:26 +0100 Subject: [PATCH] fix: is dir --- .github/workflows/cd.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 4bb861cf19..1e795d09e9 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -94,6 +94,7 @@ jobs: uses: actions/download-artifact@v4 - name: Uncompress all artifacts run: | + ls -al # Define the temporary and release directories tmp_dir="massa_tmp" release_dir="massa_release" @@ -110,15 +111,19 @@ jobs: mkdir -p "$release_dir" # Extract files from the temporary directory to the release directory - for file in "$tmp_dir"/*; do - if [[ "$file" == *.zip ]]; then - unzip "$file" -d "$release_dir/" - elif [[ "$file" == *.tar.gz ]]; then - tar -xzf "$file" -C "$release_dir/" + cd "$tmp_dir" || exit 1 # Move into the temporary directory + for file in *; do + if [[ -f "$file" ]]; then # Check if it's a file + if [[ "$file" == *.zip ]]; then + unzip "$file" -d "../$release_dir/" + elif [[ "$file" == *.tar.gz ]]; then + tar -xzf "$file" -C "../$release_dir/" + fi fi done - # Remove the temporary directory + # Move back to the original directory and remove the temporary directory + cd .. rm -rf "$tmp_dir" - name: Generate checksums file