forked from cue-lang/cuelang.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bash
executable file
·33 lines (26 loc) · 874 Bytes
/
build.bash
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
#!/usr/bin/env bash
set -eux
# build.bash is used to build the site ready for deploy.
time=""
if [ "${NETLIFY:-}" != "true" ]
then
time="time -p"
fi
# If we are building tip then we need to grab the master of our cuelang.org/go
# and main from github.com/cue-sh/playground dependencies
if [ "${BRANCH:-}" = "tip" ]
then
# We set GOPRIVATE here because we reguarly see issues when trying to go get
# a recent commit that index.golang.org might not yet have seen.
GOPRIVATE=cuelang.org/go $time go get cuelang.org/go@master
# Now force cuelang.org/go through the proxy so that the /pkg.go.dev redirect works
$time go get -d cuelang.org/go@$(go list -m -f={{.Version}} cuelang.org/go)
$time go mod tidy
$time go generate ./...
fi
# Main site
$time git submodule update -f --init --recursive
$time npm install
$time hugo $@
# CUE playground
bash play/build.bash