#!/usr/bin/env ruby

ENV['TZ'] = 'US/Pacific'
date = Time.now
tag = "nightly-#{date.strftime('%Y%m%d')}"

# update build number
puts "##teamcity[buildNumber '#{tag}']" if ARGV.include?('--update-build-number')

`git tag #{tag} && git push --tags`
