Guest User

Untitled

a guest
Nov 6th, 2017
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. <macrodef name = "git">
  2. <attribute name = "command" />
  3. <attribute name = "dir" default = "" />
  4. <element name = "args" optional = "true" />
  5. <sequential>
  6. <echo message = "git @{command}" />
  7. <exec executable = "git" dir = "@{dir}">
  8. <arg value = "@{command}" />
  9. <args/>
  10. </exec>
  11. </sequential>
  12. </macrodef>
  13.  
  14. <target name="initGit">
  15. <git command="config" dir="retrieveUnpackaged">
  16. <args>
  17. <arg value="--global"/>
  18. <arg value="user.name"/>
  19. <arg value="'Dark, Skull'"/>
  20. </args>
  21. </git>
  22.  
  23. <git command="config">
  24. <args>
  25. <arg value="--global"/>
  26. <arg value="user.email"/>
  27. <arg value="'myemail@email.com'"/>
  28. </args>
  29. </git>
  30. </target>
  31.  
  32.  
  33.  
  34. <target name="retrieveDeployVersioning">
  35. <mkdir dir="retrieveUnpackaged"/>
  36.  
  37. <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"/>
  38. <sf:deploy username="${sf.destination.username}" password="${sf.destination.password}" sessionId="${sf.sessionId}" serverurl="${sf.destination.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="retrieveUnpackaged" rollbackOnError="true"/>
  39.  
  40.  
  41. <git command="init"></git>
  42. <git command="add">
  43. <args>
  44. <arg value="--all"/>
  45. </args>
  46. </git>
  47. <git command="commit">
  48. <args>
  49. <arg value ="-m 'Initial Commit'"/>
  50. </args>
  51. </git>
  52. <git command="remote">
  53. <args>
  54. <arg value="add"/>
  55. <arg value="origin"/>
  56. <arg value="https://github.com/test-versioning.git"/>
  57. </args>
  58. </git>
  59. <git command="push" dir="retrieveUnpackaged">
  60. <args>
  61. <arg value="-u"/>
  62. <arg value="origin"/>
  63. <arg value="master"/>
  64. </args>
  65. </git>
  66. </target>
Add Comment
Please, Sign In to add comment