1

I try to write a build automation script with Powershell(i am new to it). My three problems are:

  1. How to press two times enter key after the duilding of some files. The main problem is how to press a key after the "press any key" message on console.
  2. How to commit with svn or break if build was not succesfull (Errolevel ==1).
  3. How to write in svn commit comments, build number and revision number. I want to take the numbers exclusively. Also i want to write build number on some local .txt and .target files.

1 Answer 1

1
  1. Fix your build process to not "pause" or otherwise wait for user input. If you're automating this process, it needs to function without user intervention.
  2. To commit with svn, use svn commit. If you want to stop the commit in the event the build fails, we can't help you as we don't know how your current process works. Usually, you'll have to test for the error condition, then take the appropriate action.
    Alternatively, you could always commit, and instead rely upon a continuous integration server to perform your builds & run tests, then update a dashboard and/or send an email when the build is broken.
  3. To pass a commit message to svn commit, use --message followed by the commit message in quotes. As for the rest, that's (again) dependent upon your particular build process.

TL;DR: There's a lot more work you need to do to prepare your build process for automation, and not a lot of specific answers people here can give you because we don't know anything about how that process works.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.