Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

git describe via Bitbucket REST API

Hello Community,

We are trying to create a Yocto based CI builder for our embedded product that uses RPM package management. For official releases, we tag the repository and adjust the necessary bitbake recipes for the build and this all works fine. The released package can then be traced back to the tag in the repository from which it came. For CI builds we previously used a scheme wherein the third digit of the version number was the 'commits in front of tag' output of the ''git describe --first-parent". Eg.


In this example, our CI package name would be embedded-1.4.148.rpm. We use this scheme as it allows the testers to easily know that -148 is 'newer' than -147 otherwise they will need to look at the repository for the commit number eg. g8979a0.

Our old build system, checked out the code then ran the "git describe" command to figure out the version to give to the package. This is different in Bitbake as there is no checked out code at the start of the build.

This may be the closest alternative. It looks for the 'commit' keyword on the repository webpage but I believe this script only works for github.

The alternative solution is to use a combination of 'git ls-remote --tags' to find the commit number, then use the Bitbucket REST API for commits and search through the returned pages.

What we need is a Bitbucket REST API that can provide us with the 'git describe --first-parent' output.





Log in or Sign up to comment
AUG Leaders

Atlassian Community Events