As we already know, the link for the raw file in Bitbucket contains the hash commit name. Hence the url is dynamic and depends on the hash commit name.
So its difficult to use this link in automation scripts.
There is a way to get the permanent link for raw file in Bitbucket.
This urls is permanent and will not change on different commits.
Here we need to replace username, repo-name, branch and file-name accordingly.