-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildenv
72 lines (58 loc) · 1.66 KB
/
buildenv
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
# bump: glab-version /GITLAB_CLI_VERSION="(.*)"/ https://gitlab.com/gitlab-org/cli.git|semver:*
GITLAB_CLI_VERSION="1.52.0"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_CATEGORIES="development"
export ZOPEN_STABLE_TAG="v${GITLAB_CLI_VERSION}"
export ZOPEN_STABLE_URL="https://gitlab.com/gitlab-org/cli.git"
export ZOPEN_STABLE_DEPS="check_go make wharf git coreutils"
export ZOPEN_DEV_URL="https://gitlab.com/gitlab-org/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="go"
export ZOPEN_MAKE_OPTS="build"
export ZOPEN_MAKE_MINIMAL=1
export ZOPEN_INSTALL="zopen_install"
export ZOPEN_CHECK="skip"
export ZOPEN_CLEAN="zopen_clean"
export ZOPEN_INSTALL_OPTS="install prefix=\$ZOPEN_INSTALL_DIR"
export ZOPEN_NAME="gitlabcli"
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_install()
{
go install
}
zopen_wharf()
{
cd ..
git clone https://github.com/AlecAivazis/survey.git
git clone https://github.com/gosuri/uilive.git
cd survey
git apply ../patches/surveypatch
cd ..
cd uilive
git apply ../patches/uilivepatch
cd ..
go work init ./cli ./survey ./uilive
wharf ./cli/cmd/glab/...
cd ./cli/cmd/glab
}
zopen_clean()
{
rm -rf ../.wharf_cache ../go.work* ../wharf_port ../survey ../uilive
}
zopen_get_version()
{
# ./bin/gh --version | head -1 | cut -f3 -d' ' | cut -d'-' -f1
echo "$GITLAB_CLI_VERSION"
}