Skip to content

Commit

Permalink
feat: update drawio-desktop
Browse files Browse the repository at this point in the history
Updates to drawio-desktop 14.5.1.
All changes from 14.1.8 to 14.5.1, inclusive, are added in this build.
  • Loading branch information
rlespinasse committed Mar 28, 2021
1 parent bd4f22c commit fcd5a6f
Show file tree
Hide file tree
Showing 13 changed files with 10,071 additions and 65 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: technote-space/auto-cancel-redundant-workflow@v1
- uses: actions/checkout@v2
- uses: rlespinasse/[email protected]
- name: Build docker image
run: make build
env:
DOCKER_IMAGE: ${{ github.repository }}:${{ env.GITHUB_REF_SLUG }}
- name: Test docker image
run: |
make setup-test
make test
env:
DOCKER_IMAGE: ${{ github.repository }}:${{ env.GITHUB_REF_SLUG }}
- uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17.3.7
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
output/
*.pdf
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM debian:latest

WORKDIR "/opt/drawio-desktop"

ENV DRAWIO_VERSION "14.1.8"
ENV DRAWIO_VERSION "14.5.1"
RUN set -e; \
apt-get update && apt-get install -y \
libappindicator3-1 \
Expand All @@ -16,22 +16,23 @@ RUN set -e; \
libxss1 \
libxtst6 \
libgbm-dev \
sgrep \
wget \
xdg-utils \
xvfb; \
wget -q https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/draw.io-amd64-${DRAWIO_VERSION}.deb \
&& apt-get install /opt/drawio-desktop/draw.io-amd64-${DRAWIO_VERSION}.deb \
&& rm -rf /opt/drawio-desktop/draw.io-amd64-${DRAWIO_VERSION}.deb; \
wget -q https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/drawio-amd64-${DRAWIO_VERSION}.deb \
&& apt-get install /opt/drawio-desktop/drawio-amd64-${DRAWIO_VERSION}.deb \
&& rm -rf /opt/drawio-desktop/drawio-amd64-${DRAWIO_VERSION}.deb; \
rm -rf /var/lib/apt/lists/*;

COPY scripts/* ./

ENV ELECTRON_DISABLE_SECURITY_WARNINGS "true"
ENV DRAWIO_DISABLE_UPDATE "true"
ENV DRAWIO_DESKTOP_COMMAND_TIMEOUT "10s"
ENV DRAWIO_DESKTOP_EXECUTABLE_PATH "/opt/draw.io/drawio"
ENV DRAWIO_DESKTOP_RUNNER_COMMAND_LINE "/opt/drawio-desktop/runner.sh"
ENV DRAWIO_DESKTOP_EXECUTABLE_PATH "/opt/drawio/drawio"
# Currently, no security warning in this version of drawio desktop
# ENV DRAWIO_DESKTOP_RUNNER_COMMAND_LINE "/opt/drawio-desktop/runner.sh"
ENV DRAWIO_DESKTOP_RUNNER_COMMAND_LINE "/opt/drawio-desktop/runner-no-security-warnings.sh"
ENV XVFB_DISPLAY ":42"
ENV XVFB_OPTIONS ""

Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ DOCKER_IMAGE?=rlespinasse/drawio-desktop-headless:local
build:
@docker build -t ${DOCKER_IMAGE} .

build-no-cache:
@docker build --no-cache --progress plain -t ${DOCKER_IMAGE} .

RUN_ARGS?=
DOCKER_OPTIONS?=
run:
@docker run -t $(DOCKER_OPTIONS) -w /data -v $(PWD):/data ${DOCKER_IMAGE} ${RUN_ARGS}

setup-test:
@npm install -g bats
@npm install bats

test: cleanup build
@mkdir -p tests/output
@DOCKER_IMAGE=$(DOCKER_IMAGE) bats -r tests
@DOCKER_IMAGE=$(DOCKER_IMAGE) npx bats -r tests

cleanup:
@rm -rf tests/output
Loading

0 comments on commit fcd5a6f

Please sign in to comment.