forked from adamlaska/boulder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-deb.sh
More file actions
executable file
·41 lines (32 loc) · 1.09 KB
/
make-deb.sh
File metadata and controls
executable file
·41 lines (32 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
#
# This script expects to run on Ubuntu. It installs the dependencies necessary
# to build Boulder and produce a Debian Package. The actual build and packaging
# is handled by a call to Make.
#
# -e Stops execution in the instance of a command or pipeline error.
# -u Treat unset variables as an error and exit immediately.
set -eu
#
# Setup Dependencies
#
sudo apt-get install -y --no-install-recommends \
ruby \
ruby-dev \
gcc
# Parse our production Go version from our docker-compose file.
GO_VERSION=$(grep "BOULDER_TOOLS_TAG:-" docker-compose.yml | sed -e 's/.*-go//' -e 's/_.*//')
# Download and unpack our production go version.
$(dirname -- "${0}")/fetch-and-verify-go.sh "${GO_VERSION}"
sudo tar -C /usr/local -xzf go.tar.gz
export PATH=/usr/local/go/bin:$PATH
# Install fpm, this is used in our Makefile to package Boulder as a deb or rpm.
sudo gem install --no-document fpm
#
# Build
#
# Set $ARCHIVEDIR to our current directory. If left unset our Makefile will set
# it to /tmp.
export ARCHIVEDIR="${PWD}"
# Build Boulder and produce a Debian Package at $PWD.
make deb