From ef43ec73ad496e915d4611f66906e4943bcf7cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Sun, 19 Jan 2025 22:55:11 +0100 Subject: [PATCH] Fix rosti.sh generator --- .github/workflows/test.yml | 4 +++- gen_rosti.fish | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e068081..bbcad49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,8 @@ jobs: # echo "${{ secrets.repo_password }}" | podman login -u $USERNAME --password-stdin $REPO docker login gitea.ceperka.net -u "${{ secrets.REPO_USERNAME }}" -p "${{ secrets.REPO_PASSWORD }}" task pipeline REPO=gitea.ceperka.net/rosti/runtime VERSION=pipeline - + - name: Cleaning step + if: always() + run: docker stop dev_test diff --git a/gen_rosti.fish b/gen_rosti.fish index 0c587c6..4d1f09b 100755 --- a/gen_rosti.fish +++ b/gen_rosti.fish @@ -4,9 +4,14 @@ set TECHS_FILE /tmp/techs.txt echo -n > $TECHS_FILE -for line in (cat Dockerfile | grep "RUN build_") - set VERSION (echo $line | cut -d " " -f 3) - set TECH_SCRIPT (echo $line | cut -d " " -f 2) +for line in (cat Dockerfile | grep "build_" | grep -v "/usr/local") + set line (echo $line | sed "s/RUN //") + set line (echo $line | sed "s/ADD //") + set line (echo $line | sed "s/& \\\//") + set line (echo $line | sed "s/^[ ]*//") + + set VERSION (echo $line | cut -d " " -f 2) + set TECH_SCRIPT (echo $line | cut -d " " -f 1) switch $TECH_SCRIPT case "build_php.sh"