diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index c83b9b0..8a2b825 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -35,5 +35,5 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: 3.2 - - run: sudo make install + - run: make install - run: make diff --git a/.rultor.yml b/.rultor.yml index 354e65c..91bdcb0 100644 --- a/.rultor.yml +++ b/.rultor.yml @@ -23,7 +23,7 @@ docker: image: yegor256/rultor-image:1.23.1 install: | - sudo make install "--directory=$(pwd)" + make install "--directory=$(pwd)" merge: script: |- sudo docker build "$(pwd)" diff --git a/Dockerfile b/Dockerfile index 25210d1..f1522fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,18 +40,14 @@ RUN rm -rf /usr/lib/node_modules \ && apt-get -y install --no-install-recommends \ nodejs \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && npm install -g sass@1.77.1 - -RUN gem install judges:0.0.31 \ - && curl -sL -o /usr/local/Saxon.jar \ - https://repo.maven.apache.org/maven2/net/sf/saxon/Saxon-HE/9.8.0-5/Saxon-HE-9.8.0-5.jar + && rm -rf /var/lib/apt/lists/* WORKDIR /home COPY Makefile /home COPY entry.sh /home COPY sass /home/sass COPY xsl /home/xsl +RUN make --directory=/home --no-silent install RUN make --directory=/home --no-silent ENTRYPOINT ["/home/entry.sh", "/home"] diff --git a/Makefile b/Makefile index e842e36..41c7277 100644 --- a/Makefile +++ b/Makefile @@ -61,8 +61,8 @@ $(CSS): sass/*.scss | target clean: rm -rf target -install: - wget --no-verbose -O /usr/local/Saxon.jar https://repo.maven.apache.org/maven2/net/sf/saxon/Saxon-HE/9.8.0-5/Saxon-HE-9.8.0-5.jar +install: target + wget --no-verbose -O target/saxon.jar https://repo.maven.apache.org/maven2/net/sf/saxon/Saxon-HE/9.8.0-5/Saxon-HE-9.8.0-5.jar gem install judges:0.0.31 npm install -g sass@1.77.2 diff --git a/entry.sh b/entry.sh index 331d5b7..b319684 100755 --- a/entry.sh +++ b/entry.sh @@ -36,13 +36,6 @@ else SELF=$1 fi -SAXON=/usr/local/Saxon.jar -if [ ! -e "${SAXON}" ]; then - echo "There is not Saxon JAR at this path: ${SAXON}." - echo "Because of this, XSLT transformations won't work." - exit 1 -fi - # Convert the factbase to a few human-readable formats if [ -z "${GITHUB_WORKSPACE}" ]; then echo 'Probably you are running this script not from GitHub Actions.' @@ -75,7 +68,7 @@ done # Build a summary HTML. css=$(cat "${SELF}/target/css/main.css") -java -jar ${SAXON} \ +java -jar "${SELF}/saxon.jar" \ "-s:${INPUT_OUTPUT}/${name}.xml" \ "-xsl:${SELF}/target/xsl/index.xsl" \ "-o:${INPUT_OUTPUT}/${name}.html" \