[jenkins] - fixed approach for detecting the current branch once and for all (works for attached and detached heads and also for pull requests)
fixed build with amplayer, thanks rockchip