Script to load AutoMap with documents from a Git repository

Specify the Git URL to retrieve documents/files from with <GIT_URL>.

The Git location contents will be copied to the AutoMap job file directory. Then the "dir" command is used to build a list of filenames with the proper filename extension (*.ditamap), each of which will be included in the AutoMap publication.

A subdirectory called "docs" will be created that contains all the files (including subdirectories) from the Git repository at <GIT_URL>. All documents with the specified file extension will be included in the AutoMap publication. In this case filenames with a ".ditamap" extension are published.

rmdir /S /Q docs
git clone "<GIT_URL>" docs
dir docs\*.ditamap /B /S > "${FileListPath}"

Script steps explained:

  1. The above script removes any previously existing "docs" subdirectory inside the directory that contains the AutoMap job file.

  2. All files located in the Git repository located at: <GIT_URL> are copied to the "docs" subdirectory.

  3. Finally the "dir" command is used to create a list of all the files located in the "docs" subdirectory that have the ".ditamap" extension.

Example Git URLs:

HelpCenter/Tips/VersionControl/AutoMapDocumentCheckoutScripts/GIT (last edited 2016-10-06 12:57:34 by TonyMcDow)