Skip to content

Commit a6dcabf

Browse files
committed
deprecate makefile target, add optional verbose output, check for dependencies
1 parent 51e7e5c commit a6dcabf

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ coderd/database/dump.sql: $(wildcard coderd/database/migrations/*.sql)
6060
coderd/database/querier.go: coderd/database/dump.sql $(wildcard coderd/database/queries/*.sql)
6161
coderd/database/generate.sh
6262

63+
# This target is deprecated, as GNU make has issues passing signals to subprocesses.
6364
dev:
64-
./scripts/develop.sh
65+
@echo Please run ./scripts/develop.sh manually.
6566
.PHONY: dev
6667

6768
fmt/prettier:

scripts/develop.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
#!/usr/bin/env bash
22

3+
# Allow toggling verbose output
4+
[[ ! -z ${VERBOSE:-""} ]] && set -x
35
set -euo pipefail
4-
set -x
56

67
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
8+
source "${SCRIPT_DIR}/lib.sh"
79
PROJECT_ROOT=$(cd "$SCRIPT_DIR" && git rev-parse --show-toplevel)
810
set +u
911
CODER_DEV_ADMIN_PASSWORD="${CODER_DEV_ADMIN_PASSWORD:-password}"
1012
set -u
1113

12-
# Preflight check: make sure nothing is listening on port 3000 or 8080
14+
# Preflight checks: ensure we have our required dependencies, and make sure nothing is listening on port 3000 or 8080
15+
dependencies git make nc go yarn
1316
nc -z 127.0.0.1 3000 && echo '== ERROR: something is listening on port 3000. Kill it and re-run this script.' && exit 1
1417
nc -z 127.0.0.1 8080 && echo '== ERROR: something is listening on port 8080. Kill it and re-run this script.' && exit 1
1518

0 commit comments

Comments
 (0)