diff --git a/Dockerfile b/Dockerfile index 1f2d1ca..52f2dc8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,36 @@ -FROM ubuntu +FROM ubuntu:latest as base ENV TZ=US/Eastern RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update -RUN apt-get install -y build-essential curl +RUN apt-get install -y build-essential curl zstd git -# NodeJS >= 6.0 -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - -RUN apt-get install -y nodejs - -# ttfautohint -RUN apt-get install -y ttfautohint +FROM base as builder # otfcc depends on premake5 WORKDIR /tmp -RUN curl -sLo premake5.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-alpha14/premake-5.0.0-alpha14-linux.tar.gz -RUN tar xvf premake5.tar.gz && mv premake5 /usr/local/bin/premake5 && rm premake5.tar.gz +ENV PREMAKE_VERSION 5.0.0-alpha15 +RUN curl -sL https://github.com/premake/premake-core/releases/download/v${PREMAKE_VERSION}/premake-${PREMAKE_VERSION}-linux.tar.gz | tar -xzC /tmp +RUN mv /tmp/premake5 /usr/local/bin/premake5 # otfcc WORKDIR /tmp -RUN curl -sLo otfcc.tar.gz https://github.com/caryll/otfcc/archive/v0.10.4.tar.gz -RUN tar xvf otfcc.tar.gz && mv otfcc-0.10.4 otfcc +ENV OTFCC_VERSION=0.10.4 +RUN curl -sL https://github.com/caryll/otfcc/archive/v${OTFCC_VERSION}.tar.gz | tar -xzC /tmp +RUN mv otfcc-${OTFCC_VERSION} otfcc WORKDIR /tmp/otfcc RUN premake5 gmake && cd build/gmake && make config=release_x64 -WORKDIR /tmp/otfcc/bin/release-x64 -RUN mv otfccbuild /usr/local/bin/otfccbuild -RUN mv otfccdump /usr/local/bin/otfccdump -WORKDIR /tmp -RUN rm -rf otfcc/ otfcc.tar.gz + +FROM base +COPY --from=builder /tmp/otfcc/bin/release-x64/otfccbuild /usr/local/bin/otfccbuild +COPY --from=builder /tmp/otfcc/bin/release-x64/otfccdump /usr/local/bin/otfccdump + +# NodeJS >= 12.16.0 +RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - +RUN apt-get install -y nodejs ttfautohint magic-wormhole + +WORKDIR / +ADD ./private-build-plans.toml / +ADD build.sh / + +CMD ["/build.sh"] diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..f91e6d1 --- /dev/null +++ b/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash -eux +set -o pipefail + +git clone https://github.com/be5invis/Iosevka +cp private-build-plans.toml ./Iosevka + +cd /Iosevka +npm i +npm run build -- contents::iosevka-acicchetti + +cd dist/iosevka-acicchetti/ttf/ +tar avf iosevka-acicchetti-$(date -I).tzst *.ttf + +wormhole send *.tzst diff --git a/justfile b/justfile index 4f631cc..cd4736f 100644 --- a/justfile +++ b/justfile @@ -2,7 +2,9 @@ docker-build: DOCKER_BUILDKIT=1 docker build -t iosevka . docker-run: docker-build - sudo docker run -it --mount type=bind,source=$(pwd),dst=/Iosevka iosevka + docker run -it iosevka clone: git clone http://github.com/be5invis/iosevka + +wormhole: docker-run