Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Local Manifest XML logic #49

Merged
merged 9 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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}")
else
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

Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 && \
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
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
Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -456,12 +456,11 @@ 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 && \
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 ; \
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/twrp-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
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
Expand All @@ -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."
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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; \
$LOCAL_MANIFEST && \

# Sync the repositories
/opt/crave/resync.sh && \
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/twrp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
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
Expand All @@ -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."
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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; \
$LOCAL_MANIFEST && \

# Sync the repositories
/opt/crave/resync.sh && \
Expand Down