Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - step:
- name: Push smCore to androidsmcore repo
- script:
- # Clone target repo
- - git clone https://x-token-auth:${ANDROIDSMCORE_TOKEN}@bitbucket.org/contech-sm/androidsmcore.git target-repo
- - cd target-repo
- # Create or checkout pipeline-update branch from main
- - git fetch origin
- - git checkout -B pipeline-update origin/main || git checkout -B pipeline-update
- # Only update smCore folder (keep smBle as-is)
- - rm -rf com/dewalt/smCore
- - mkdir -p com/dewalt/smCore
- - cp -r ../smCore/build/sm-core/Android/com/dewalt/smCore/* com/dewalt/smCore/
- # Commit and push
- - git config user.email "[email protected]"
- - git config user.name "Bitbucket Pipeline"
- - git add com/dewalt/smCore/
- - git commit -m "Update smCore to v$(cat com/dewalt/smCore/maven-metadata.xml | grep -oP '(?<=<version>)[^<]+' | head -1) - Build #${BITBUCKET_BUILD_NUMBER}" || echo "No changes"
- - git push -f origin pipeline-update
- # Print PR creation link
- - echo "=============================================="
- - echo "Create PR at:"
- - echo "https://bitbucket.org/contech-sm/androidsmcore/pull-requests/new?source=pipeline-update&dest=main"
- - echo "=============================================="
Advertisement
Add Comment
Please, Sign In to add comment