Teach build script to detect release candidates and properly format release id.