Created
June 21, 2010 15:06
-
-
Save crallen/446976 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple Ruby script to reset TeamCity build numbers | |
USER_DIR = ENV['USERPROFILE'].gsub('\\', '/') | |
# If the .BuildServer directory for TeamCity is located elsewhere on your machine, change this constant to match | |
TC_BUILDSERVER_CONFIG = File.join(USER_DIR, '.BuildServer', 'config', '**', '*.buildNumbers.properties') | |
Dir.glob(TC_BUILDSERVER_CONFIG).each do |file| | |
buffer = File.new(file, 'r').read.gsub(/next.build=\d+/, 'next.build=1') | |
File.open(file, 'w') { |f| f.write(buffer) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment