Skip to content

Commit

Permalink
#402 Add erd-go as alternative to erd
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijnve committed Mar 22, 2023
1 parent a9eef53 commit 08924c3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 install github.com/kaishuu0123/erd-go@latest
- name: Install DPIC
run: sudo apt-get install -qq dpic
- name: Install Pikchr
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -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::
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/partials/advanced.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
1 change: 1 addition & 0 deletions docs/modules/ROOT/partials/uris.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/asciidoctor-diagram/erd/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 08924c3

Please sign in to comment.