Skip to content

Commit 422d418

Browse files
committed
Refactor Dockerfile and normalize.sh scripts.
1 parent 8806f1e commit 422d418

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/main/resources/org/eolang/hone/scaffolding/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ RUN gpg --batch --recv-keys ECA44F5A172EDAD947F39E3D4275CDA6A29BED43 \
3232
&& chmod +x /usr/bin/ghcup \
3333
&& ghcup config set gpg-setting GPGStrict \
3434
&& ghcup -v install ghc --isolate /usr/local --force "${GHC}" \
35-
&& ghcup -v install cabal --isolate /usr/local/bin --force "${CABAL}" \
36-
&& cabal update
35+
&& ghcup -v install cabal --isolate /usr/local/bin --force "${CABAL}"
3736

3837
ARG PHINO_VERSION=0.0.0.0
39-
RUN cabal install --disable-tests --disable-coverage --overwrite-policy=always "phino-${PHINO_VERSION}" \
38+
RUN cabal update \
39+
&& cabal install --disable-tests --disable-coverage --overwrite-policy=always "phino-${PHINO_VERSION}" \
4040
&& find /root -name phino -type f 2>/dev/null | head -1 | xargs -I {} cp {} /usr/local/bin/phino \
4141
&& chmod +x /usr/local/bin/phino \
4242
&& /usr/local/bin/phino --version

src/main/resources/org/eolang/hone/scaffolding/normalize.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,11 @@ if [ "${threads}" == '0' ]; then
156156
threads=$(nproc)
157157
echo "Using ${threads} threads, by the number of CPUs"
158158
fi
159-
args=(
160-
'--halt-on-error=now,fail=1'
161-
'--halt=now,fail=1'
162-
'--retries=0'
163-
"--joblog=/target/hone-tasks.log"
164-
"--max-procs=${threads}"
165-
"--will-cite"
166-
)
167159
export PARALLEL_HOME=/target/parallel
168160
mkdir -p "${PARALLEL_HOME}"
169161
echo "Starting to rewrite ${total} file(s) in ${threads} thread(s)..."
170162
start=$(date '+%s.%N')
171-
parallel "${args[@]}" < "${tasks}"
163+
parallel --retries=0 --joblog=/target/hone-tasks.log --will-cite \
164+
"--max-procs=${threads}" \
165+
--halt-on-error=now,fail=1 --halt=now,fail=1 < "${tasks}"
172166
echo "Finished rewriting ${total} file(s) in $(perl -E "say int($(date '+%s.%N') - ${start})") seconds"

0 commit comments

Comments
 (0)