Skip to content
Snippets Groups Projects

MVP build process

Merged Erick Hitter requested to merge 1-add-build into master
Compare and Show latest version
1 file
+ 18
5
Compare changes
  • Side-by-side
  • Inline
+ 18
5
#!/usr/bin/env bash
set -e
set -x
# Log when the build occurred.
date
echo ""
@@ -10,13 +13,16 @@ export OG_DIR
echo "$OG_DIR"
echo ""
# Common directories.
# Common paths.
NGINX_SRC_DIR="$OG_DIR/src/nginx"
export NGINX_SRC_DIR
mkdir -p "$NGINX_SRC_DIR"
NGINX_SRC_ARCHIVE="$OG_DIR/src/nginx-src.tar.gz"
EXPORT NGINX_SRC_ARCHIVE
export NGINX_SRC_ARCHIVE
NGINX_SRC_ARCHIVE_SIGNATURE="$OG_DIR/src/nginx-src.tar.gz.asc"
export NGINX_SRC_ARCHIVE_SIGNATURE
OPENSSL_DIR="$OG_DIR/src/openssl"
export OPENSSL_DIR
@@ -31,7 +37,7 @@ export NGINX_CT_DIR
echo "DEPENDENCY: OpenSSL"
git clone -q --recursive --depth 1 https://github.com/openssl/openssl.git -b "$OPENSSL_TAG" "$OPENSSL_DIR"
cd "$OPENSSL_DIR" || exit
./config
./config no-shared
# Dependency: ngx_brotli (no tagged releases)
echo ""
@@ -45,9 +51,16 @@ git clone -q --recursive --depth 1 https://github.com/grahamedgecombe/nginx-ct.g
# Configure nginx
echo ""
echo "DOWNLOADING NGINX RELEASE"
echo "DOWNLOADING & VERIFYING NGINX RELEASE"
cd "$OG_DIR" || exit
curl -o "$NGINX_SRC_ARCHIVE" "$NGINX_SRC"
curl -o "$NGINX_SRC_ARCHIVE_SIGNATURE" "$NGINX_SIGNING"
# Disabled as nginx is signing with individuals' keys.
#gpg --import <(curl https://nginx.org/keys/nginx_signing.key)
#gpg --verify "$NGINX_SRC_ARCHIVE_SIGNATURE" "$NGINX_SRC_ARCHIVE"
tar -zxvf "$NGINX_SRC_ARCHIVE" -C "$NGINX_SRC_DIR" --strip 1
cd "$NGINX_SRC_DIR" || exit
./configure \
@@ -94,5 +107,5 @@ cd "$NGINX_SRC_DIR" || exit
echo ""
echo "BUILDING NGINX"
echo "Using $(nproc) jobs"
make -j$(nproc)
make -j"$(nproc)"
"$NGINX_SRC_DIR/objs/nginx -V"
Loading