-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildenv
More file actions
80 lines (64 loc) · 1.75 KB
/
buildenv
File metadata and controls
80 lines (64 loc) · 1.75 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# bump: ghcli-version /GITHUB_CLI_VERSION="(.*)"/ https://github.com/cli/cli.git|semver:*
GITHUB_CLI_VERSION="2.86.0"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_CATEGORIES="development networking"
export ZOPEN_STABLE_TAG="v${GITHUB_CLI_VERSION}"
export ZOPEN_STABLE_URL="https://github.com/cli/cli.git"
export ZOPEN_STABLE_DEPS="check_go make wharf git coreutils"
export ZOPEN_DEV_URL="https://github.com/cli/cli.git"
export ZOPEN_DEV_DEPS="check_go make wharf git coreutils"
export ZOPEN_DEV_BRANCH="trunk"
export ZOPEN_RUNTIME_DEPS="git"
export ZOPEN_COMP=GO
export ZOPEN_CONFIGURE="zopen_wharf"
export ZOPEN_CONFIGURE_MINIMAL=1
export ZOPEN_MAKE="zopen_build"
export ZOPEN_MAKE_MINIMAL=1
export ZOPEN_CHECK="skip"
export ZOPEN_CLEAN="zopen_clean"
export ZOPEN_INSTALL_OPTS="install prefix=\$ZOPEN_INSTALL_DIR"
export ZOPEN_NAME="githubcli"
ln -fs cli githubcli
zopen_init()
{
export CGO_ENABLED=0
# Go installs binaries, so create the bin dir as well
export GOBIN=$ZOPEN_INSTALL_DIR/bin
export PATH=$PATH:$GOROOT/go-build-zos/bin
mkdir -p $ZOPEN_INSTALL_DIR
}
zopen_build()
{
go build -o script/build script/build.go
./script/build
}
zopen_wharf()
{
cd ..
git clone https://github.com/AlecAivazis/survey.git
cd survey
# AlecAivazis/survey needs a patch for cli to build
git apply ../patches/gopatch
cd ..
go work init ./cli ./survey
wharf ./cli/...
cd ./cli
}
zopen_append_to_env() {
cat <<EOF
export SSL_CERT_FILE=\$PWD/cacert.pem
EOF
}
zopen_post_install()
{
# Install a cacert.pem to be used (optionally) by the customer
$MYDIR/zopen update-cacert -f $1
}
zopen_clean()
{
rm -rf ../.wharf_cache ../go.work* ../wharf_port ../survey
}
zopen_get_version()
{
./bin/gh --version | head -1 | cut -f3 -d' ' | cut -d'-' -f1
}