Skip to content

Commit

Permalink
simplify build
Browse files Browse the repository at this point in the history
  • Loading branch information
snowp committed Dec 8, 2024
1 parent a9c4da8 commit 6102469
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integrations_android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Compress Plugin artifacts
run: |
readonly dir=$(pwd)
(cd capture-timber/build/repos/releases/io/bitdrift/capture-plugin/${{ inputs.version }} && zip -r "$dir/capture-plugin.zip" ./*)
(cd capture-plugin/build/repos/releases/io/bitdrift/capture-plugin/${{ inputs.version }} && zip -r "$dir/capture-plugin.zip" ./*)
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release_gh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: capture-timber.zip
- uses: actions/download-artifact@v4
with:
name: capture-plugin.zip
- name: Prepare Android artifacts
run: ./ci/gh_prepare_android_artifacts.sh "$VERSION"
env:
Expand All @@ -223,7 +226,8 @@ jobs:
"Capture-$VERSION.android.zip" \
"example-apps.ios.zip" \
"example-apps.android.zip" \
"capture-timber-$VERSION.android.zip"
"capture-timber-$VERSION.android.zip" \
"capture-plugin-$VERSION.android.zip" \
env:
VERSION: ${{ inputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 6 additions & 24 deletions ci/gh_prepare_android_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,15 @@ function prepare_capture_sdk() {
function prepare_capture_timber() {
echo "+++ Preparing Android Capture Timber library artifacts for '$version' version"

pushd "$(mktemp -d)"
local -r out_artifacts_dir="capture-timber-out"

unzip "$sdk_repo/capture-timber.zip"

mkdir "$out_artifacts_dir"

local -r name="capture-timber-$version"

files=(\
"$name.aar" \
"$name.module" \
"$name.pom" \
"$name-javadoc.jar" \
"$name-sources.jar" \
"$sdk_repo/ci/LICENSE.txt" \
"$sdk_repo/ci/NOTICE.txt" \
)
cp $sdk_repo/capture-timber.zip $sdk_repo/capture-timber-$version.android.zip
}

for file in "${files[@]}"; do
filename=$(basename "$file")
mv "$file" "$out_artifacts_dir/$filename"
done
function prepare_capture_plugin() {
echo "+++ Preparing Android Capture Timber library artifacts for '$version' version"

(cd "$out_artifacts_dir" && zip -r "$sdk_repo/capture-timber-$version.android.zip" ./*)
popd
cp $sdk_repo/capture-plugin.zip $sdk_repo/capture-plugin-$version.android.zip
}

prepare_capture_sdk
prepare_capture_timber
prepare_capture_plugin

0 comments on commit 6102469

Please sign in to comment.