eliot kimber contrext llc
play

Eliot Kimber Contrext, LLC DITA OT Day 2015 Munich, Germany - PowerPoint PPT Presentation

Multiple OTs with Git Managing dozens of OT configurations using git Eliot Kimber Contrext, LLC DITA OT Day 2015 Munich, Germany Contrext, LLC 12/8/2015 1 Problem: Many OT Configurations Different OT versions Per-client OT


  1. Multiple OTs with Git Managing dozens of OT configurations using git Eliot Kimber Contrext, LLC DITA OT Day 2015 Munich, Germany Contrext, LLC 12/8/2015 1

  2. Problem: Many OT Configurations • Different OT versions • Per-client OT configurations • Experiments • Projects • Etc. Contrext, LLC 12/8/2015 2

  3. Solution: Make OT Directory a Git repo $ cd ~/DITA-OT $ git init $ git add – A $ git commit – m "Initial setup" One value is single location for OT — don't have to modify oXygenXML or other tools that need to know where OT is. Contrext, LLC 12/8/2015 3

  4. One Branch Per Configuration $ git checkout – b 1.8.5 $ git checkout master $ git checkout – b 2.x $ rm – Rf * $ copy – r ../DITA-OT-2.2.1/* $ git add – A . $ git commit – m "2.2.1 version" $ git checkout – b example.org $ git branch 1.8.5 2.x * example.org master Contrext, LLC 12/8/2015 4

  5. Be Sure to Include .jar Files $ cat .gitignore !*.jar Contrext, LLC 12/8/2015 5

  6. Exclude Generated Files $ cat .gitignore !*.jar build.xml catalog-dita.xml lib/org.dita.dost.platform/plugin.properties plugins/org.dita.eclipsehelp/xsl/map2plugin.xsl resource/messages.xml xsl/preprocess/maplink.xsl xsl/preprocess/mappull.xsl xsl/preprocess/mapref.xsl Contrext, LLC 12/8/2015 6

  7. Create an "empty" branch $ git checkout – b empty $ rm – Rf * $ git add -A $ git commit – m "Empty branch" $ git checkout 1.8.5 $ ant – f integrator.xml $ git checkout – f empty $ rm – Rf * $ git checkout 2.x Contrext, LLC 12/8/2015 7

  8. Gotchas • Not committing Jar files – On checkout of branch, PDF generation fails – Check or override your default ignore settings • Committing generated files – Produces non-useful changes you have to ignore or manually remove – List ignored files in .gitignore • Switching between branches after deploying new plugins – Use the empty branch Contrext, LLC 12/8/2015 8

  9. Questions? Contrext, LLC 12/8/2015 9

Recommend


More recommend