Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <macrodef name = "git">
- <attribute name = "command" />
- <attribute name = "dir" default = "" />
- <element name = "args" optional = "true" />
- <sequential>
- <echo message = "git @{command}" />
- <exec executable = "git" dir = "@{dir}">
- <arg value = "@{command}" />
- <args/>
- </exec>
- </sequential>
- </macrodef>
- <target name="initGit">
- <git command="config" dir="retrieveUnpackaged">
- <args>
- <arg value="--global"/>
- <arg value="user.name"/>
- <arg value="'Dark, Skull'"/>
- </args>
- </git>
- <git command="config">
- <args>
- <arg value="--global"/>
- <arg value="user.email"/>
- <arg value="'myemail@email.com'"/>
- </args>
- </git>
- </target>
- <target name="retrieveDeployVersioning">
- <mkdir dir="retrieveUnpackaged"/>
- <sf:retrieve username="${sf.source.username}" password="${sf.source.password}" sessionId="${sf.sessionId}" serverurl="${sf.source.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="retrieveUnpackaged" unpackaged="unpackaged/package.xml"/>
- <sf:deploy username="${sf.destination.username}" password="${sf.destination.password}" sessionId="${sf.sessionId}" serverurl="${sf.destination.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="retrieveUnpackaged" rollbackOnError="true"/>
- <git command="init"></git>
- <git command="add">
- <args>
- <arg value="--all"/>
- </args>
- </git>
- <git command="commit">
- <args>
- <arg value ="-m 'Initial Commit'"/>
- </args>
- </git>
- <git command="remote">
- <args>
- <arg value="add"/>
- <arg value="origin"/>
- <arg value="https://github.com/test-versioning.git"/>
- </args>
- </git>
- <git command="push" dir="retrieveUnpackaged">
- <args>
- <arg value="-u"/>
- <arg value="origin"/>
- <arg value="master"/>
- </args>
- </git>
- </target>
Add Comment
Please, Sign In to add comment