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

eliot kimber contrext llc
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Multiple OTs with Git Managing dozens of OT configurations using git

12/8/2015

Contrext, LLC

1

Eliot Kimber Contrext, LLC

DITA OT Day 2015 Munich, Germany

slide-2
SLIDE 2

Problem: Many OT Configurations

  • Different OT versions
  • Per-client OT configurations
  • Experiments
  • Projects
  • Etc.

12/8/2015

Contrext, LLC

2

slide-3
SLIDE 3

Solution: Make OT Directory a Git repo

$ cd ~/DITA-OT $ git init $ git add –A $ git commit –m "Initial setup"

12/8/2015

Contrext, LLC

3

One value is single location for OT—don't have to modify oXygenXML or other tools that need to know where OT is.

slide-4
SLIDE 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

12/8/2015

Contrext, LLC

4

slide-5
SLIDE 5

Be Sure to Include .jar Files

$ cat .gitignore !*.jar

12/8/2015

Contrext, LLC

5

slide-6
SLIDE 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

12/8/2015

Contrext, LLC

6

slide-7
SLIDE 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

12/8/2015

Contrext, LLC

7

slide-8
SLIDE 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

12/8/2015

Contrext, LLC

8

slide-9
SLIDE 9

Questions?

12/8/2015

Contrext, LLC

9