From 01e4e1c0d73038d656ec28e4dc9f04c679f08187 Mon Sep 17 00:00:00 2001 From: Pepijn Van Eeckhoudt Date: Tue, 21 Mar 2023 15:09:45 +0100 Subject: [PATCH] #402 Add erd-go as alternative to erd --- .github/workflows/ci-linux.yml | 8 ++------ .github/workflows/ci-macos.yml | 11 ++--------- CHANGELOG.adoc | 6 ++++++ docs/modules/ROOT/partials/advanced.adoc | 2 +- docs/modules/ROOT/partials/uris.adoc | 1 + lib/asciidoctor-diagram/erd/converter.rb | 2 +- 6 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index dae391e6..b62ab1ab 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -71,8 +71,7 @@ jobs: cargo \ texlive-latex-extra \ texlive-fonts-extra \ - git \ - haskell-stack + git - name: Setup Node uses: actions/setup-node@v2 with: @@ -109,10 +108,7 @@ jobs: run: npm install -g bytefield-svg - name: Install ERD run: | - git clone https://github.com/BurntSushi/erd - cd erd - stack install - echo "$HOME/.local/bin" >> $GITHUB_PATH + go get github.com/kaishuu0123/erd-go@latest - name: Install DPIC run: sudo apt-get install -qq dpic - name: Install Pikchr diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index d2aac12f..ceef6d0e 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -29,10 +29,6 @@ jobs: bundler-cache: true - name: Setup Golang uses: actions/setup-go@v2 - - name: Setup Haskell - uses: haskell/actions/setup@v2 - with: - enable-stack: true - name: Install Python Dependencies run: | export HOMEBREW_NO_INSTALL_CLEANUP=1 @@ -59,16 +55,13 @@ jobs: sudo spctl --add "$PWD/LilyPond.app" - name: Install AsciitoSVG run: | - go get github.com/asciitosvg/asciitosvg/cmd/a2s + go install github.com/asciitosvg/asciitosvg/cmd/a2s@latest echo "$HOME/go/bin" >> $GITHUB_PATH - name: Install Bytefield-SVG run: npm install -g bytefield-svg - name: Install ERD run: | - git clone https://github.com/BurntSushi/erd - cd erd - stack install - echo "$HOME/.local/bin" >> $GITHUB_PATH + go install github.com/kaishuu0123/erd-go@latest - name: Install DPIC run: | wget https://ece.uwaterloo.ca/~aplevich/dpic/dpic.tar.gz diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 03cee18c..86ca0c91 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -1,5 +1,11 @@ = Asciidoctor-diagram Changelog +== 2.2.5 + +Enhancements:: + +* Issue #402: Add https://github.com/kaishuu0123/erd-go[erd-go] support + == 2.2.4 Enhancements:: diff --git a/docs/modules/ROOT/partials/advanced.adoc b/docs/modules/ROOT/partials/advanced.adoc index f0168efa..90a35bf5 100644 --- a/docs/modules/ROOT/partials/advanced.adoc +++ b/docs/modules/ROOT/partials/advanced.adoc @@ -76,7 +76,7 @@ The following table lists the tools that are required for each diagram type, the |diagrams |{uri-python}[Python] |`diagrams-python` |ditaa |{uri-java}[Java] |`java` |dpic |{uri-dpic}[dpic] |`dpic` - |erd |{uri-erd}[Erd] |`erd` + |erd |{uri-erd}[Erd] or {uri-erd-go}[Erd Go] |`erd` |gnuplot |{uri-gnuplot}[Gnuplot] |`gnuplot` |graphviz |{uri-graphviz}[GraphViz] |`dot` or `graphvizdot` |meme |{uri-imagemagick}[ImageMagick] |`convert` and `identify` diff --git a/docs/modules/ROOT/partials/uris.adoc b/docs/modules/ROOT/partials/uris.adoc index 13e8c623..0be87425 100644 --- a/docs/modules/ROOT/partials/uris.adoc +++ b/docs/modules/ROOT/partials/uris.adoc @@ -10,6 +10,7 @@ :uri-dpic: https://gitlab.com/aplevich/dpic :uri-dot: https://graphviz.gitlab.io/_pages/doc/info/lang.html :uri-erd: https://github.com/BurntSushi/erd +:uri-erd-go: https://github.com/kaishuu0123/erd-go :uri-gnuplot: http://gnuplot.info :uri-graphviz: https://graphviz.gitlab.io :uri-imagemagick: http://www.imagemagick.org diff --git a/lib/asciidoctor-diagram/erd/converter.rb b/lib/asciidoctor-diagram/erd/converter.rb index 644f15d9..51504aa0 100644 --- a/lib/asciidoctor-diagram/erd/converter.rb +++ b/lib/asciidoctor-diagram/erd/converter.rb @@ -15,7 +15,7 @@ def supported_formats end def convert(source, format, options) - erd_path = source.find_command('erd') + erd_path = source.find_command('erd', :alt_cmds => ['erd-go']) dot_path = source.find_command('dot', :alt_attrs => ['graphvizdot']) dot_code = generate_stdin(erd_path, format.to_s, source.to_s) do |tool_path, output_path|