So many changes

This commit is contained in:
Anthony Cicchetti 2020-05-10 16:02:09 -04:00
parent 1e98c07897
commit 8b25df85bc
3 changed files with 40 additions and 18 deletions

View file

@ -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"]

14
build.sh Normal file
View file

@ -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

View file

@ -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