-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.rc
44 lines (35 loc) · 1.02 KB
/
build.rc
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
42
43
44
# Used by build.sh to customize/add functions
export DEV_PACKAGES="libxml2-dev"
export RUN_PACKAGES="libxml2"
export CUCUMBER_PACKAGES="libpq-dev libxml2-dev zlib1g-dev postgresql-client-common libproj-dev"
function golang_dev_dependencies() {
apt_install $DEFAULT_DEV_PACKAGES $DEV_PACKAGES
}
function golang_run_dependencies() {
apt_install $RUN_PACKAGES
}
function golang_flags() {
# Use -mod=vendor when go mod vendor has been performed
if [ -f "vendor/modules.txt" ]; then
echo export GOFLAGS=\"-mod=vendor\"
fi
}
bitbucket_env_functions+=(golang_flags)
function bitbucket_database() {
cat > "${ARA_ROOT:-.}/config/database.yml" <<EOF
test:
name: ${ARA_DB_NAME}
user: ${ARA_DB_USER}
host: ${ARA_DB_HOST}
password: ${ARA_DB_PASSWORD}
port: ${ARA_DB_PORT:-5432}
EOF
}
function cucumber_dependencies() {
apt_install $DEFAULT_DEV_PACKAGES $CUCUMBER_PACKAGES $RUN_PACKAGES
}
function cucumber_install() {
# golang_dependencies_run not needed
cucumber_dependencies
bundler_install
}