Delete Dockerfile and run script

This commit is contained in:
Ezequiel Juarez Garcia 2020-05-29 19:53:48 -04:00
parent 8133c342f2
commit dc5675eb0d
2 changed files with 0 additions and 88 deletions

View file

@ -1,41 +0,0 @@
# Run example
#
# docker run \
# -v ./build_dir:/build \
# iosevka_build
FROM ubuntu:20.04
ARG OTFCC_VER=0.10.4
ARG PREMAKE_VER=5.0.0-alpha15
ARG NODE_VER=14
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
curl \
ttfautohint \
&& curl -sSL https://deb.nodesource.com/setup_${NODE_VER}.x | bash - \
&& apt-get install -y nodejs \
&& cd /tmp \
&& curl -sSLo premake5.tar.gz https://github.com/premake/premake-core/releases/download/v${PREMAKE_VER}/premake-${PREMAKE_VER}-linux.tar.gz \
&& tar xvf premake5.tar.gz \
&& mv premake5 /usr/local/bin/premake5 \
&& rm premake5.tar.gz \
&& curl -sSLo otfcc.tar.gz https://github.com/caryll/otfcc/archive/v${OTFCC_VER}.tar.gz \
&& tar xvf otfcc.tar.gz \
&& mv otfcc-${OTFCC_VER} otfcc \
&& cd /tmp/otfcc \
&& premake5 gmake \
&& cd build/gmake \
&& make config=release_x64 \
&& cd /tmp/otfcc/bin/release-x64 \
&& mv otfccbuild /usr/local/bin/otfccbuild \
&& mv otfccdump /usr/local/bin/otfccdump \
&& cd /tmp \
&& rm -rf otfcc/ otfcc.tar.gz \
&& rm -rf /var/lib/apt/lists/*
COPY run.sh /run.sh
WORKDIR /build
ENTRYPOINT ["/bin/bash", "/run.sh"]

47
run.sh
View file

@ -1,47 +0,0 @@
#!/bin/bash
set -e
# Create temporary build directory
mkdir /tmp/build
cd /tmp/build
# Find the latest font version if the font version environment variable is not
# set
if [ ! -n "$FONT_VERSION" ]; then
FONT_VERSION=$(curl -s https://github.com/be5invis/Iosevka/releases/latest \
| grep -Po '(?<=tag/v)[0-9,.]*')
fi
echo "Downloading and checking the validity of the source code..."
# Download source code
curl -L -O --proto '=https' --tlsv1.2 -sS https://github.com/be5invis/Iosevka/archive/v${FONT_VERSION}.tar.gz
# Check for valid downloaded file (build can fail here with exit code 1)
file "v${FONT_VERSION}.tar.gz" | grep 'gzip compressed data' > /dev/null
# Extract downloaded source code
tar -xf v${FONT_VERSION}.tar.gz
cd Iosevka-${FONT_VERSION}
# Copy the build plan
cp /build/private-build-plans.toml .
# Build!
echo "Commencing build of v${FONT_VERSION}..."
npm install
if [ $# -eq 0 ]; then
# Get the name of the first build plan when the user does not provide
# custom build arguments (automatic mode)
PLAN_NAME=$(grep -Po -m 1 '(?<=buildPlans.)[^\]]*' private-build-plans.toml)
npm run build -- contents::$PLAN_NAME
else
# User knows what they are doing and provides custom build arguments
# (manual mode)
npm run build -- "$@"
fi
# Copy the dist folder back to the mounted volume
cp -r dist /build/