Skip to content

Instantly share code, notes, and snippets.

@bvlion
Created March 5, 2024 22:33
Show Gist options
  • Save bvlion/06e3cc20fffca851163734b89896f5cf to your computer and use it in GitHub Desktop.
Save bvlion/06e3cc20fffca851163734b89896f5cf to your computer and use it in GitHub Desktop.
use file_to_dropbox_from_bitbucket
image: uber/android-build-environment:latest
pipelines:
branches:
master:
- step:
script:
- mkdir -p "$ANDROID_HOME/licenses"
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" >> "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "d56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\nd975f751698a77b662f1254ddbeed3901e976f5a" >> "$ANDROID_HOME/licenses/intel-android-extra-license"
- echo y | android update sdk --no-ui -a
- bash gradlew clean assembleRelease
- bash dropbox.sh
#!/bin/bash
curl -X POST https://api.dropboxapi.com/2/files/delete \
--header 'Authorization: Bearer ${access_token}' \
--header 'Content-Type: application/json' \
--data '{"path":"/module/${apk-name}.apk"}'
curl -X POST https://content.dropboxapi.com/2/files/upload \
--header "Authorization: Bearer ${access_token}" \
--header "Dropbox-API-Arg: { \"path\": \"/module/${apk-name}.apk\", \"mode\": \"add\", \"autorename\": true, \"mute\": false }" \
--header "Content-Type: application/octet-stream" \
--data-binary @app/build/outputs/apk/release/app-release.apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment