Typically, both companies will announce an upgrade within 2 weeks after you buy a new bike.
But that said, being on the absolute cutting edge isn't necessarily all that great. It is a lot easier to source parts for gruppos that are installed on 1000s of bikes that have already been sold by your LBS than it is to find a replacement for the latest and greatest gruppo that came out just last week. I'd think twice about buying two generations back unless I was getting a really good deal, but I'd never worry about waiting for a new release from shimano or sram before buying a bike. Either it shifts and rides nicely or it doesn't. That's all that really matters.
--sam