minafaw3

publish lib code

Jan 6th, 2026
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. - step:
  2. name: Push smCore to androidsmcore repo
  3. script:
  4. # Clone target repo
  5. - git clone https://x-token-auth:${ANDROIDSMCORE_TOKEN}@bitbucket.org/contech-sm/androidsmcore.git target-repo
  6. - cd target-repo
  7.  
  8. # Create or checkout pipeline-update branch from main
  9. - git fetch origin
  10. - git checkout -B pipeline-update origin/main || git checkout -B pipeline-update
  11.  
  12. # Only update smCore folder (keep smBle as-is)
  13. - rm -rf com/dewalt/smCore
  14. - mkdir -p com/dewalt/smCore
  15. - cp -r ../smCore/build/sm-core/Android/com/dewalt/smCore/* com/dewalt/smCore/
  16.  
  17. # Commit and push
  18. - git config user.email "[email protected]"
  19. - git config user.name "Bitbucket Pipeline"
  20. - git add com/dewalt/smCore/
  21. - 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"
  22. - git push -f origin pipeline-update
  23.  
  24. # Print PR creation link
  25. - echo "=============================================="
  26. - echo "Create PR at:"
  27. - echo "https://bitbucket.org/contech-sm/androidsmcore/pull-requests/new?source=pipeline-update&dest=main"
  28. - echo "=============================================="
Advertisement
Add Comment
Please, Sign In to add comment