I have to write a shell script the would connect with svn and takes the code from build.xml Does anyone know how to do it. Thank you!
newguyintown · Mar 25, 2013 5:08 PM · 15,872 views
Did not understand your question. Where do you want to write this shell script.? Where is this build.xml stored at and why source code and build.xml is not stored in subversion. Be clear, may be I will be able to help you.
hawachawa · Mar 25, 2013 5:54 PM
I need to write a shell-script that will check out bulit.xml fro mthe command line!
newguyintown · Mar 25, 2013 6:04 PM
It is in svn.
newguyintown · Mar 25, 2013 6:05 PM
built.xml is in svn.
newguyintown · Mar 25, 2013 6:05 PM
http://lmgtfy.com/?q=shell+scr...
prankster · Mar 25, 2013 6:19 PM
Basically, I need to write a shell script from the unix command prompt that would connect to the svn and execute built.xml and trigger the built in ever 1 hour.
newguyintown · Mar 25, 2013 7:01 PM
I think what you are looking for is to change the post hook script which will checkout the file called build.xml on every commit that is made to the source code. Or of you do not want to make changes to hook script, the other way might be to add a cron job to checkout build.xml for every hour. And for build are you using some CI tools? If it is, you can just configure it from your build tool UI to do a build on every commit made on subversion. If you are looking to build using ant may be you should look on something like svnant.
hawachawa · Mar 25, 2013 11:03 PM
Thank you! I need to write a script that talks with svn server: This is the requirement: 1. I have to write a script the would connect with svn and 2. takes the code from build.xml
newguyintown · Mar 25, 2013 11:59 PM
what you are trying to do sounds like a continuous integration kind of scenario..from my experience, build.xml is in the project and when you checkin, the build server checks for a new checkin and builds the project using the steps in build.xml and checks in a tag with a version number if the build succeeds. I haven't done it in Linux/unix environment but I have done it using build.xml, MSBuild, Powershell and Hudson/CC.Net.
ekduiteen · Mar 26, 2013 12:32 AM
Has anyone written a script on tortoise command prompt that would checkout svn and executes the script that is in there?
newguyintown · Mar 26, 2013 11:32 AM
#svn checkout $(REPO_BUILD_URL) $(NAME)-$(VERSION)-$(RELEASE) #cd $(NAME)-$(VERSION)-$(RELEASE); ant war svn checkout $(REPO_URL)$(VERSION).$(RELEASE) $(NAME)-$(VERSION)-$(RELEASE) unzip -qq $(NAME)-$(VERSION)-$(RELEASE)/$(SOURCEFILE) -d $(NAME)-$(VERSION)-$(RELEASE)/$(WEBAPP_NAME) #unzip -qq $(NAME)-$(VERSION)-$(RELEASE)/lib/$(SOURCEFILE) -d $(NAME)-$(VERSION)-$(RELEASE)/$(WEBAPP_NAME) cp worker.properties.proforms $(NAME)-$(VERSION)-$(RELEASE)/$(WEBAPP_NAME) #cp ibis.conf $(NAME)-$(VERSION)-$(RELEASE)/$(WEBAPP_NAME) cp context.xml $(NAME)-$(VERSION)-$(RELEASE)/$(WEBAPP_NAME) cp web.xml $(NAME)-$(VERSION)-$(RELEASE)/$(WEBAPP_NAME) rm -f $(NAME)-$(VERSION)-$(RELEASE)/$(SOURCEFILE) Try to do make file and put script as above Also you can use tools like Hudson as someone suggested to do continous integration builds in hr week etc it has UI based console and very user friendly has option to take build xml get code form SVN run corn jobs etc etc
Gohtalo · Mar 26, 2013 12:26 PM
Please check your message gothalo dai!
newguyintown · Mar 26, 2013 2:04 PM
I need to write a script that checks out a file (built.xml) from the svn (i have tortoise installed) and on one of the directories there is built.xml is installed. And the purpose of this built.xml is to check if the built is not compiled. My script has to give an error message if there was something wrong on the built. I am brand new in svn and windows scripting world. Your guidance, help, suggestions would be highly appreciated! I am writing this on windows: cmd.exe terminal
newguyintown · Mar 27, 2013 4:40 PM
Thank you all your inputs.
newguyintown · Mar 27, 2013 4:41 PM
This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.
Start a New Discussion