You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/09/17 22:57:58 UTC

[isis] 04/07: ISIS-2062: moves extensions/fixtures module to ext-markdown/ROOT component

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch v2-antora
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 70ff7280f9a94cc70efddebb8b135ad089ef43e3
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 17 19:26:16 2019 +0100

    ISIS-2062: moves extensions/fixtures module to ext-markdown/ROOT component
---
 antora/components/ext-fixtures/antora.yml          |  6 ++++
 antora/components/ext-fixtures/examples.csv        |  1 +
 .../modules/ROOT}/_attributes.adoc                 |  0
 .../modules/ROOT/assets/attachments}/.gitkeep      |  0
 .../modules/ROOT}/assets/images/.gitkeep           |  0
 .../modules/ROOT/examples}/.gitkeep                |  0
 .../components/ext-fixtures/modules/ROOT/nav.adoc  |  2 ++
 .../modules/ROOT}/pages/_attributes.adoc           |  0
 .../modules/ROOT}/pages/_partials/_attributes.adoc |  0
 .../modules/ROOT}/pages/about.adoc                 |  0
 antora/components/ext-fixtures/sync_examples.sh    | 39 ++++++++++++++++++++++
 antora/components/extensions/antora.yml            |  1 -
 .../extensions/modules/fixtures/nav.adoc           |  2 --
 .../components/toc/modules/ROOT/pages/about.adoc   |  4 +--
 14 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/antora/components/ext-fixtures/antora.yml b/antora/components/ext-fixtures/antora.yml
new file mode 100644
index 0000000..fc4f3a1
--- /dev/null
+++ b/antora/components/ext-fixtures/antora.yml
@@ -0,0 +1,6 @@
+name: ext-fixtures
+title: "Extensions - Fixtures"
+version: master
+start_page: ROOT:about.adoc
+nav:
+- modules/ROOT/nav.adoc
diff --git a/antora/components/ext-fixtures/examples.csv b/antora/components/ext-fixtures/examples.csv
new file mode 100644
index 0000000..5d5804b
--- /dev/null
+++ b/antora/components/ext-fixtures/examples.csv
@@ -0,0 +1 @@
+#file,source,target
diff --git a/antora/components/extensions/modules/fixtures/_attributes.adoc b/antora/components/ext-fixtures/modules/ROOT/_attributes.adoc
similarity index 100%
rename from antora/components/extensions/modules/fixtures/_attributes.adoc
rename to antora/components/ext-fixtures/modules/ROOT/_attributes.adoc
diff --git a/antora/components/extensions/modules/fixtures/examples/.gitkeep b/antora/components/ext-fixtures/modules/ROOT/assets/attachments/.gitkeep
similarity index 100%
rename from antora/components/extensions/modules/fixtures/examples/.gitkeep
rename to antora/components/ext-fixtures/modules/ROOT/assets/attachments/.gitkeep
diff --git a/antora/components/extensions/modules/fixtures/assets/images/.gitkeep b/antora/components/ext-fixtures/modules/ROOT/assets/images/.gitkeep
similarity index 100%
rename from antora/components/extensions/modules/fixtures/assets/images/.gitkeep
rename to antora/components/ext-fixtures/modules/ROOT/assets/images/.gitkeep
diff --git a/antora/components/extensions/modules/fixtures/assets/attachments/.gitkeep b/antora/components/ext-fixtures/modules/ROOT/examples/.gitkeep
similarity index 100%
rename from antora/components/extensions/modules/fixtures/assets/attachments/.gitkeep
rename to antora/components/ext-fixtures/modules/ROOT/examples/.gitkeep
diff --git a/antora/components/ext-fixtures/modules/ROOT/nav.adoc b/antora/components/ext-fixtures/modules/ROOT/nav.adoc
new file mode 100644
index 0000000..2815342
--- /dev/null
+++ b/antora/components/ext-fixtures/modules/ROOT/nav.adoc
@@ -0,0 +1,2 @@
+* xref:about.adoc[About]
+
diff --git a/antora/components/extensions/modules/fixtures/pages/_attributes.adoc b/antora/components/ext-fixtures/modules/ROOT/pages/_attributes.adoc
similarity index 100%
rename from antora/components/extensions/modules/fixtures/pages/_attributes.adoc
rename to antora/components/ext-fixtures/modules/ROOT/pages/_attributes.adoc
diff --git a/antora/components/extensions/modules/fixtures/pages/_partials/_attributes.adoc b/antora/components/ext-fixtures/modules/ROOT/pages/_partials/_attributes.adoc
similarity index 100%
rename from antora/components/extensions/modules/fixtures/pages/_partials/_attributes.adoc
rename to antora/components/ext-fixtures/modules/ROOT/pages/_partials/_attributes.adoc
diff --git a/antora/components/extensions/modules/fixtures/pages/about.adoc b/antora/components/ext-fixtures/modules/ROOT/pages/about.adoc
similarity index 100%
rename from antora/components/extensions/modules/fixtures/pages/about.adoc
rename to antora/components/ext-fixtures/modules/ROOT/pages/about.adoc
diff --git a/antora/components/ext-fixtures/sync_examples.sh b/antora/components/ext-fixtures/sync_examples.sh
new file mode 100644
index 0000000..5260cd7
--- /dev/null
+++ b/antora/components/ext-fixtures/sync_examples.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+SCRIPT=$(readlink -f "$0")
+SCRIPTPATH=$(dirname "$SCRIPT")
+if [ $# -ne 1 ]; then
+    FILELIST=$SCRIPTPATH/examples.csv
+else
+    FILELIST=$1
+fi
+FILELISTFQN=$(readlink -f $FILELIST)
+DIRNAME=$(dirname $FILELISTFQN)
+BASENAME=$(basename $FILELISTFQN)
+
+cd $DIRNAME >/dev/null 2>&1
+cat $BASENAME | tail +2 | grep -v ^# | while read LINE
+do
+    FILE=$(echo $LINE | awk -F, '{print $1}' | awk '{$1=$1;print}')
+    F2=$(echo $LINE | awk -F, '{print $2}' | awk '{$1=$1;print}')
+    F3=$(echo $LINE | awk -F, '{print $3}' | awk '{$1=$1;print}')
+    SOURCEFQN=$DIRNAME/$F2/$FILE
+    TARGETDIR=$DIRNAME/$F3
+    TARGETFQN=$DIRNAME/$F3/$FILE
+
+    echo "SOURCEFQN: $SOURCEFQN"
+
+    if [ -f "$SOURCEFQN" ]
+    then
+
+        if [ -f "$TARGETFQN" ]
+        then
+            rm $TARGETFQN
+        fi
+        mkdir -p $TARGETDIR
+        cp $SOURCEFQN $TARGETFQN
+    else
+        echo "- does not exist ($SOURCEFQN) " >&2
+        exit 1
+    fi
+done
+cd - >/dev/null 2>&1
\ No newline at end of file
diff --git a/antora/components/extensions/antora.yml b/antora/components/extensions/antora.yml
index ab9cd94..12549bd 100644
--- a/antora/components/extensions/antora.yml
+++ b/antora/components/extensions/antora.yml
@@ -4,7 +4,6 @@ version: master
 start_page: ROOT:about.adoc
 nav:
 - modules/ROOT/nav.adoc
-- modules/fixtures/nav.adoc
 - modules/specsupport/nav.adoc
 - modules/secman/nav.adoc
 - modules/viewer-wicket-excel/nav.adoc
diff --git a/antora/components/extensions/modules/fixtures/nav.adoc b/antora/components/extensions/modules/fixtures/nav.adoc
deleted file mode 100644
index a7bcce2..0000000
--- a/antora/components/extensions/modules/fixtures/nav.adoc
+++ /dev/null
@@ -1,2 +0,0 @@
-* xref:about.adoc[Fixtures]
-
diff --git a/antora/components/toc/modules/ROOT/pages/about.adoc b/antora/components/toc/modules/ROOT/pages/about.adoc
index 1bebc4f..cb4d334 100644
--- a/antora/components/toc/modules/ROOT/pages/about.adoc
+++ b/antora/components/toc/modules/ROOT/pages/about.adoc
@@ -60,13 +60,13 @@ include::_attributes.adoc[]
 |*Extensions*
 
 * Testing & Prototyping
-** xref:ext:fixtures:about.adoc[Fixtures]
+** xref:ext-fixtures:ROOT:about.adoc[Fixtures]
 ** xref:ext:specsupport:about.adoc[(BDD) Spec Support]
 * Modules
 **  xref:ext:secman:about.adoc[Security Manager]
 **  xref:ext:viewer-wicket-excel:about.adoc[Excel Download (Wicket)]
 * Values Types
-**  xref:ext-asciidoc:ROOT:about.adoc[Asciidoc], xref:ext:markdown:about.adoc[Markdown]
+**  xref:ext-asciidoc:ROOT:about.adoc[Asciidoc], xref:ext-markdown:ROOT:about.adoc[Markdown]
 
 |*Get involved*