updated deploying method so it is more flexible with snapshots and releases.