Absolutely fight back and claim credit. If your director or senior manager (ie, your boss's boss) knows you built it in its entirety, it's easier to get promoted this way rather than through your direct boss. That's because at cross calibrations, when the managers all get together to rate their reports for that enticing bonus/promo, the senior managers have to be convinced as to who should get what. So if your senior manager or director knows your name, then it's much easier to get that promo, and your boss can't hide it from them for his own gain since your name is already so well known.
That's just office politics, and everyone has to play whether you like it or not, unfortunately. Claim your title, don't depend on others if you did the work. Make yourself known, it's the only way to win.