Skip to content

Commit

Permalink
#3 saxon
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 22, 2024
1 parent b207791 commit 838288f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- run: sudo make install
- run: make install
- run: make
2 changes: 1 addition & 1 deletion .rultor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

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

Check failure on line 51 in Dockerfile

View workflow job for this annotation

GitHub Actions / hadolint

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.

ENTRYPOINT ["/home/entry.sh", "/home"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

Expand Down
9 changes: 1 addition & 8 deletions entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down Expand Up @@ -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" \
Expand Down

0 comments on commit 838288f

Please sign in to comment.