File tree 2 files changed +13
-3
lines changed
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ bin: $(shell find . -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
20
20
21
21
mkdir -p ./dist
22
22
rm -rf ./dist/coder-slim_*
23
+ rm -f ./site/out/bin/coder*
23
24
./scripts/build_go_slim.sh \
25
+ --compress 6 \
24
26
--version "$(VERSION)" \
25
27
--output ./dist/ \
26
28
linux:amd64,armv7,arm64 \
@@ -31,6 +33,7 @@ bin: $(shell find . -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
31
33
build : site/out/index.html $(shell find . -not -path './vendor/* ' -type f -name '* .go') go.mod go.sum $(shell find ./examples/templates)
32
34
rm -rf ./dist
33
35
mkdir -p ./dist
36
+ rm -f ./site/out/bin/coder*
34
37
35
38
# build slim artifacts and copy them to the site output directory
36
39
./scripts/build_go_slim.sh \
Original file line number Diff line number Diff line change @@ -17,8 +17,15 @@ dependencies curl git go make yarn
17
17
curl --fail http://127.0.0.1:3000 > /dev/null 2>&1 && echo ' == ERROR: something is listening on port 3000. Kill it and re-run this script.' && exit 1
18
18
curl --fail http://127.0.0.1:8080 > /dev/null 2>&1 && echo ' == ERROR: something is listening on port 8080. Kill it and re-run this script.' && exit 1
19
19
20
- echo ' == Run "make build" before running this command to build binaries.'
21
- echo ' == Without these binaries, workspaces will fail to start!'
20
+ if [[ ! -e ./site/out/bin/coder.sha1 && ! -e ./site/out/bin/coder.tar.zst ]]; then
21
+ log
22
+ log " ======================================================================="
23
+ log " == Run 'make bin' before running this command to build binaries. =="
24
+ log " == Without these binaries, workspaces will fail to start! =="
25
+ log " ======================================================================="
26
+ log
27
+ exit 1
28
+ fi
22
29
23
30
# Run yarn install, to make sure node_modules are ready to go
24
31
" $PROJECT_ROOT /scripts/yarn_install.sh"
@@ -28,7 +35,7 @@ echo '== Without these binaries, workspaces will fail to start!'
28
35
# https://stackoverflow.com/questions/3004811/how-do-you-run-multiple-programs-in-parallel-from-a-bash-script
29
36
(
30
37
SCRIPT_PID=$$
31
- cd " ${PROJECT_ROOT} "
38
+ cdroot
32
39
CODERV2_HOST=http://127.0.0.1:3000 INSPECT_XSTATE=true yarn --cwd=./site dev || kill -INT -${SCRIPT_PID} &
33
40
go run -tags embed cmd/coder/main.go server --address 127.0.0.1:3000 --in-memory --tunnel || kill -INT -${SCRIPT_PID} &
34
41
You can’t perform that action at this time.
0 commit comments