From 1eac2eeb16512ef08123ef91a18ae1d52a4e9f6d Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:15:16 +0530 Subject: [PATCH 1/9] Change condition for local manifests --- .github/workflows/main.yml | 2 +- .github/workflows/selfhosted.yml | 2 +- .github/workflows/twrp-legacy.yml | 2 +- .github/workflows/twrp.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b54b075..40ed95a3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -432,7 +432,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - $LOCAL_MANIFEST; \ + $LOCAL_MANIFEST && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index 2b5fcabc..49041932 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -456,7 +456,7 @@ jobs: crave run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - $LOCAL_MANIFEST; \ + $LOCAL_MANIFEST && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/twrp-legacy.yml b/.github/workflows/twrp-legacy.yml index 28d6729e..e3d2190f 100644 --- a/.github/workflows/twrp-legacy.yml +++ b/.github/workflows/twrp-legacy.yml @@ -357,7 +357,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - $LOCAL_MANIFEST; \ + $LOCAL_MANIFEST && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/twrp.yml b/.github/workflows/twrp.yml index 5aaf9a30..e2414d5b 100644 --- a/.github/workflows/twrp.yml +++ b/.github/workflows/twrp.yml @@ -357,7 +357,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - $LOCAL_MANIFEST; \ + $LOCAL_MANIFEST && \ # Sync the repositories /opt/crave/resync.sh && \ From 91b6dd6c08590ef585c0384caff368ae3b566133 Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:27:42 +0530 Subject: [PATCH 2/9] Experiment with substitution --- .github/workflows/main.yml | 2 +- .github/workflows/selfhosted.yml | 2 +- .github/workflows/twrp-legacy.yml | 2 +- .github/workflows/twrp.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 40ed95a3..6c2218e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -151,7 +151,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - export LOCAL_MANIFEST=$(mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}") + export LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}\""; export LOCAL_MANIFEST else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index 49041932..ac4e8565 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -188,7 +188,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - export LOCAL_MANIFEST=$(mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}") + export LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}\""; export LOCAL_MANIFEST else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/twrp-legacy.yml b/.github/workflows/twrp-legacy.yml index e3d2190f..16f069d6 100644 --- a/.github/workflows/twrp-legacy.yml +++ b/.github/workflows/twrp-legacy.yml @@ -101,7 +101,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - export LOCAL_MANIFEST=$(mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}") + export LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}\""; export LOCAL_MANIFEST else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/twrp.yml b/.github/workflows/twrp.yml index e2414d5b..d9403df5 100644 --- a/.github/workflows/twrp.yml +++ b/.github/workflows/twrp.yml @@ -101,7 +101,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - export LOCAL_MANIFEST=$(mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}") + export LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}\""; export LOCAL_MANIFEST else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi From 960ea89ae888534fa99210b4cc91168775b5cc19 Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:38:55 +0530 Subject: [PATCH 3/9] Try to avoid export --- .github/workflows/main.yml | 2 +- .github/workflows/selfhosted.yml | 2 +- .github/workflows/twrp-legacy.yml | 2 +- .github/workflows/twrp.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c2218e0..ef84869f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -151,7 +151,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - export LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}\""; export LOCAL_MANIFEST + LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}"" else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index ac4e8565..779b4bbe 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -188,7 +188,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - export LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}\""; export LOCAL_MANIFEST + LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}"" else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/twrp-legacy.yml b/.github/workflows/twrp-legacy.yml index 16f069d6..de3dcfbd 100644 --- a/.github/workflows/twrp-legacy.yml +++ b/.github/workflows/twrp-legacy.yml @@ -101,7 +101,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - export LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}\""; export LOCAL_MANIFEST + LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}"" else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/twrp.yml b/.github/workflows/twrp.yml index d9403df5..2eab31a4 100644 --- a/.github/workflows/twrp.yml +++ b/.github/workflows/twrp.yml @@ -101,7 +101,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - export LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}\""; export LOCAL_MANIFEST + LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}"" else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi From 91d040c16eeebc7e6a066005761915fa6732cba8 Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:41:47 +0530 Subject: [PATCH 4/9] Mess around with quotes --- .github/workflows/main.yml | 2 +- .github/workflows/selfhosted.yml | 2 +- .github/workflows/twrp-legacy.yml | 2 +- .github/workflows/twrp.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef84869f..a810cd00 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -151,7 +151,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}"" + LOCAL_MANIFEST='mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "'${local_manifest_url}'"' else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index 779b4bbe..dd2555de 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -188,7 +188,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}"" + LOCAL_MANIFEST='mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "'${local_manifest_url}'"' else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/twrp-legacy.yml b/.github/workflows/twrp-legacy.yml index de3dcfbd..e0ab0ba9 100644 --- a/.github/workflows/twrp-legacy.yml +++ b/.github/workflows/twrp-legacy.yml @@ -101,7 +101,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}"" + LOCAL_MANIFEST='mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "'${local_manifest_url}'"' else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/twrp.yml b/.github/workflows/twrp.yml index 2eab31a4..8f471d26 100644 --- a/.github/workflows/twrp.yml +++ b/.github/workflows/twrp.yml @@ -101,7 +101,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml \"${local_manifest_url}"" + LOCAL_MANIFEST='mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "'${local_manifest_url}'"' else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi From 64b63c36bfe00e512ba3af23146b48f03243e0d8 Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:52:15 +0530 Subject: [PATCH 5/9] Simplify command --- .github/workflows/main.yml | 2 +- .github/workflows/selfhosted.yml | 2 +- .github/workflows/twrp-legacy.yml | 2 +- .github/workflows/twrp.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a810cd00..bc1dcc7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -151,7 +151,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - LOCAL_MANIFEST='mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "'${local_manifest_url}'"' + LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml ${local_manifest_url}" else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index dd2555de..8d9e0434 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -188,7 +188,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - LOCAL_MANIFEST='mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "'${local_manifest_url}'"' + LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml ${local_manifest_url}" else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/twrp-legacy.yml b/.github/workflows/twrp-legacy.yml index e0ab0ba9..ec57bd48 100644 --- a/.github/workflows/twrp-legacy.yml +++ b/.github/workflows/twrp-legacy.yml @@ -101,7 +101,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - LOCAL_MANIFEST='mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "'${local_manifest_url}'"' + LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml ${local_manifest_url}" else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi diff --git a/.github/workflows/twrp.yml b/.github/workflows/twrp.yml index 8f471d26..0a9cc169 100644 --- a/.github/workflows/twrp.yml +++ b/.github/workflows/twrp.yml @@ -101,7 +101,7 @@ jobs: if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists - LOCAL_MANIFEST='mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "'${local_manifest_url}'"' + LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml ${local_manifest_url}" else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi From c392260eec9b559d48f4081c5c3458f910397221 Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:15:19 +0530 Subject: [PATCH 6/9] Experiment with bash -c --- .github/workflows/main.yml | 6 +++--- .github/workflows/selfhosted.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc1dcc7c..4e0e07ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -147,12 +147,12 @@ jobs: LUNCH="breakfast ${{ github.event.inputs.PRODUCT_NAME }} ${{ github.event.inputs.BUILD_TYPE }}" fi - #copy from here + if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}" export local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists LOCAL_MANIFEST="mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml ${local_manifest_url}" - else + else export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{github.event.inputs.LOCAL_MANIFEST_BRANCH}} .repo/local_manifests" fi @@ -181,7 +181,7 @@ jobs: echo "Displaying Local Manifests" if [[ -z "${{ secrets.DISPLAY_FALSE }}" ]]; then - $LOCAL_MANIFEST + bash -c "$LOCAL_MANIFEST" cat .repo/local_manifests/*.xml else echo "Displaying is disabled through secrets." diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index 8d9e0434..95452569 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -218,7 +218,7 @@ jobs: echo "Displaying Local Manifests" if [[ -z "${{ secrets.DISPLAY_FALSE }}" ]]; then - $LOCAL_MANIFEST + bash -c "$LOCAL_MANIFEST" cat .repo/local_manifests/*.xml else echo "Displaying is disabled through secrets." From 839c645af689683ae144350f3a485d6d0bf4ce48 Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:19:23 +0530 Subject: [PATCH 7/9] Fix local manifest xml handing Thanks to @pugzarecute for coming up with that --- .github/workflows/main.yml | 4 ++-- .github/workflows/selfhosted.yml | 4 ++-- .github/workflows/twrp-legacy.yml | 7 ++++--- .github/workflows/twrp.yml | 7 ++++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e0e07ab..00bda52c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -252,7 +252,7 @@ jobs: ${{ github.event.inputs.BUILD_DIFFERENT_ROM }} fi - $LOCAL_MANIFEST + bash -c "$LOCAL_MANIFEST" timeout 1m repo sync --force-sync || { exit_code=$?; [ $exit_code -eq 124 ] || (echo "Error: Process failed with exit code $exit_code"; exit $exit_code); } du -csh . # Output Size when done @@ -432,7 +432,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - $LOCAL_MANIFEST && \ + bash -c "$LOCAL_MANIFEST" && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index 95452569..a035ce2d 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -289,7 +289,7 @@ jobs: ${{ github.event.inputs.BUILD_DIFFERENT_ROM }} fi - $LOCAL_MANIFEST + bash -c "$LOCAL_MANIFEST" timeout 1m repo sync --force-sync || { exit_code=$?; [ $exit_code -eq 124 ] || (echo "Error: Process failed with exit code $exit_code"; exit $exit_code); } du -csh . # Output Size when done @@ -456,7 +456,7 @@ jobs: crave run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - $LOCAL_MANIFEST && \ + bash -c "$LOCAL_MANIFEST" && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/twrp-legacy.yml b/.github/workflows/twrp-legacy.yml index ec57bd48..f9c29144 100644 --- a/.github/workflows/twrp-legacy.yml +++ b/.github/workflows/twrp-legacy.yml @@ -115,7 +115,7 @@ jobs: echo "Displaying Local Manifests" if [[ -z "${{ secrets.DISPLAY_FALSE }}" ]]; then - $LOCAL_MANIFEST + bash -c "$LOCAL_MANIFEST" cat .repo/local_manifests/*.xml else echo "Displaying is disabled through secrets." @@ -182,7 +182,8 @@ jobs: ${{ github.event.inputs.BUILD_DIFFERENT_ROM }} fi - $LOCAL_MANIFEST + bash -c "$LOCAL_MANIFEST" + timeout 1m repo sync --force-sync || { exit_code=$?; [ $exit_code -eq 124 ] || (echo "Error: Process failed with exit code $exit_code"; exit $exit_code); } du -csh . # Output Size when done @@ -357,7 +358,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - $LOCAL_MANIFEST && \ + bash -c "$LOCAL_MANIFEST" && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/twrp.yml b/.github/workflows/twrp.yml index 0a9cc169..2f5f6dfb 100644 --- a/.github/workflows/twrp.yml +++ b/.github/workflows/twrp.yml @@ -115,7 +115,7 @@ jobs: echo "Displaying Local Manifests" if [[ -z "${{ secrets.DISPLAY_FALSE }}" ]]; then - $LOCAL_MANIFEST + bash -c "$LOCAL_MANIFEST" cat .repo/local_manifests/*.xml else echo "Displaying is disabled through secrets." @@ -182,7 +182,8 @@ jobs: ${{ github.event.inputs.BUILD_DIFFERENT_ROM }} fi - $LOCAL_MANIFEST + bash -c "$LOCAL_MANIFEST" + timeout 1m repo sync --force-sync || { exit_code=$?; [ $exit_code -eq 124 ] || (echo "Error: Process failed with exit code $exit_code"; exit $exit_code); } du -csh . # Output Size when done @@ -357,7 +358,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - $LOCAL_MANIFEST && \ + bash -c "$LOCAL_MANIFEST" && \ # Sync the repositories /opt/crave/resync.sh && \ From a7b8fe7e8374a0e58efa3c5bf2d4832f8af5be0a Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:24:31 +0530 Subject: [PATCH 8/9] Try to use variable in crave run --- .github/workflows/main.yml | 2 +- .github/workflows/selfhosted.yml | 2 +- .github/workflows/twrp-legacy.yml | 2 +- .github/workflows/twrp.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00bda52c..a2934b84 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -432,7 +432,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - bash -c "$LOCAL_MANIFEST" && \ + $LOCAL_MANIFEST && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index a035ce2d..cb8cbe6b 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -456,7 +456,7 @@ jobs: crave run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - bash -c "$LOCAL_MANIFEST" && \ + $LOCAL_MANIFEST && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/twrp-legacy.yml b/.github/workflows/twrp-legacy.yml index f9c29144..e170375c 100644 --- a/.github/workflows/twrp-legacy.yml +++ b/.github/workflows/twrp-legacy.yml @@ -358,7 +358,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - bash -c "$LOCAL_MANIFEST" && \ + $LOCAL_MANIFEST && \ # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/twrp.yml b/.github/workflows/twrp.yml index 2f5f6dfb..b623ad80 100644 --- a/.github/workflows/twrp.yml +++ b/.github/workflows/twrp.yml @@ -358,7 +358,7 @@ jobs: crave ${{ secrets.CRAVE_FLAGS }} run --no-patch --${CLEAN} "rm -rf .repo/local_manifests/ ${{ github.event.inputs.REMOVALS }} && \ # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ - bash -c "$LOCAL_MANIFEST" && \ + $LOCAL_MANIFEST && \ # Sync the repositories /opt/crave/resync.sh && \ From 34d003b0c329762cafccd7f516bd1f8848378578 Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:31:44 +0530 Subject: [PATCH 9/9] Fix leftovers from @iamrh1819's PR --- .github/workflows/selfhosted.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index cb8cbe6b..be5bf6c7 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -457,11 +457,10 @@ jobs: # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ $LOCAL_MANIFEST && \ - + # Sync the repositories /opt/crave/resync.sh && \ - repo forall -c 'git lfs install && git lfs pull && git lfs checkout' && \ - + # Set up build environment export BUILD_USERNAME=${{ github.actor }} ; \ export BUILD_HOSTNAME=crave ; \