Skip to content

Commit

Permalink
Android: Add save android merged manifest script
Browse files Browse the repository at this point in the history
  • Loading branch information
ParaskP7 committed Feb 18, 2025
1 parent 8d93f62 commit 350f2c0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions bin/save_android_merged_manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash -eu

MODULE=$1

echo "Current directory is: $(pwd)"
echo "Current directory contents are: $(ls -la)"

# The key is shared with `bin/restore_android_merged_manifest`
ANDROID_MERGED_MANIFEST_KEY="${BUILDKITE_PIPELINE_SLUG}_ANDROID_MERGED_MANIFEST_${MODULE}"

echo "Saving Android merged manifest..."

# The directory is shared with `bin/restore_android_merged_manifest`
ANDROID_MERGED_MANIFEST="merged_manifest"

mkdir -p "$ANDROID_MERGED_MANIFEST"

cp -r ~/"${BUILDKITE_PIPELINE_SLUG}"/"${MODULE}"/build/intermediates/merged_manifest "$ANDROID_MERGED_MANIFEST" \

MERGED_MANIFEST_BASE_FOLDER=$(dirname "$ANDROID_MERGED_MANIFEST")
MERGED_MANIFEST_FOLDER_NAME=$(basename "$ANDROID_MERGED_MANIFEST")

# `save_cache` & `restore_cache` scripts only work if they are called from the same directory
pushd "$MERGED_MANIFEST_BASE_FOLDER"
echo "Current directory is: $(pwd)"
echo "Current directory contents are: $(ls -la)"
echo "Directory contents of 'MERGED_MANIFEST_FOLDER_NAME': $(ls -la "$MERGED_MANIFEST_FOLDER_NAME")"
save_cache "$MERGED_MANIFEST_FOLDER_NAME" "$ANDROID_MERGED_MANIFEST_KEY" --force
popd

0 comments on commit 350f2c0

Please sign in to comment.