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
+ 17
4
Compare changes
  • Side-by-side
  • Inline
+ 17
4
#!/usr/bin/env bash
#!/usr/bin/env bash
 
set -e
 
set -x
 
# Log when the build occurred.
# Log when the build occurred.
date
date
echo ""
echo ""
@@ -10,13 +13,16 @@ export OG_DIR
@@ -10,13 +13,16 @@ export OG_DIR
echo "$OG_DIR"
echo "$OG_DIR"
echo ""
echo ""
# Common directories.
# Common paths.
NGINX_SRC_DIR="$OG_DIR/src/nginx"
NGINX_SRC_DIR="$OG_DIR/src/nginx"
export NGINX_SRC_DIR
export NGINX_SRC_DIR
mkdir -p "$NGINX_SRC_DIR"
mkdir -p "$NGINX_SRC_DIR"
NGINX_SRC_ARCHIVE="$OG_DIR/src/nginx-src.tar.gz"
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"
OPENSSL_DIR="$OG_DIR/src/openssl"
export OPENSSL_DIR
export OPENSSL_DIR
@@ -45,9 +51,16 @@ git clone -q --recursive --depth 1 https://github.com/grahamedgecombe/nginx-ct.g
@@ -45,9 +51,16 @@ git clone -q --recursive --depth 1 https://github.com/grahamedgecombe/nginx-ct.g
# Configure nginx
# Configure nginx
echo ""
echo ""
echo "DOWNLOADING NGINX RELEASE"
echo "DOWNLOADING & VERIFYING NGINX RELEASE"
cd "$OG_DIR" || exit
cd "$OG_DIR" || exit
 
curl -o "$NGINX_SRC_ARCHIVE" "$NGINX_SRC"
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
tar -zxvf "$NGINX_SRC_ARCHIVE" -C "$NGINX_SRC_DIR" --strip 1
cd "$NGINX_SRC_DIR" || exit
cd "$NGINX_SRC_DIR" || exit
./configure \
./configure \
@@ -94,5 +107,5 @@ cd "$NGINX_SRC_DIR" || exit
@@ -94,5 +107,5 @@ cd "$NGINX_SRC_DIR" || exit
echo ""
echo ""
echo "BUILDING NGINX"
echo "BUILDING NGINX"
echo "Using $(nproc) jobs"
echo "Using $(nproc) jobs"
make -j$(nproc)
make -j"$(nproc)"
"$NGINX_SRC_DIR/objs/nginx -V"
"$NGINX_SRC_DIR/objs/nginx -V"
Loading