...
1#!/usr/bin/env bash
2#
3# This script expects to run on Ubuntu. It installs the dependencies necessary
4# to build Boulder and produce a Debian Package. The actual build and packaging
5# is handled by a call to Make.
6#
7
8# -e Stops execution in the instance of a command or pipeline error.
9# -u Treat unset variables as an error and exit immediately.
10set -eu
11
12#
13# Setup Dependencies
14#
15
16sudo apt-get install -y --no-install-recommends \
17 ruby \
18 ruby-dev \
19 gcc
20
21# Download and unpack our production go version. Ensure that $GO_VERSION is
22# already set in the environment (e.g. by the github actions release workflow).
23$(dirname -- "${0}")/fetch-and-verify-go.sh "${GO_VERSION}"
24sudo tar -C /usr/local -xzf go.tar.gz
25export PATH=/usr/local/go/bin:$PATH
26
27# Install fpm, this is used in our Makefile to package Boulder as a deb or rpm.
28sudo gem install --no-document -v 1.14.0 fpm
29
30#
31# Build
32#
33
34# Set $ARCHIVEDIR to our current directory. If left unset our Makefile will set
35# it to /tmp.
36export ARCHIVEDIR="${PWD}"
37
38# Set $VERSION to be a simulacrum of what is set in other build environments.
39export VERSION="${GO_VERSION}.$(date +%s)"
40
41# Build Boulder and produce an RPM, a .deb, and a tar.gz file in $PWD.
42make rpm deb tar
View as plain text