From fbef33f1b0846e88550bc8903c167c6704d79100 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Tue, 19 Mar 2024 17:13:55 +1100 Subject: [PATCH] fix: don't blindly run sqlc during builds as it requires PG --- Justfile | 15 ++++++++------- bin/{.mktg-0.3.0.pkg => .mk-0.5.0.pkg} | 0 bin/mk | 1 + bin/mktg | 1 - 4 files changed, 9 insertions(+), 8 deletions(-) rename bin/{.mktg-0.3.0.pkg => .mk-0.5.0.pkg} (100%) create mode 120000 bin/mk delete mode 120000 bin/mktg diff --git a/Justfile b/Justfile index d94cfad2d8..2f856837d4 100644 --- a/Justfile +++ b/Justfile @@ -23,7 +23,8 @@ build-all: build-frontend build-generate build-kt-runtime build-protos build-sql # Run "go generate" on all packages build-generate: - go generate -x ./... + mk backend/schema/aliaskind_enumer.go : backend/schema/metadataalias.go -- go generate -x backend/schema + mk internal/log/log_level_string.go : internal/log/api.go -- go generate -x internal/log # Build command-line tools build +tools: build-protos build-sqlc build-zips build-frontend @@ -39,7 +40,7 @@ init-db: # Regenerate SQLC code build-sqlc: - sqlc generate --experimental + mk backend/controller/sql/{db.go,models.go,querier.go,queries.sql.go} : backend/controller/sql/queries.sql backend/controller/sql/schema -- sqlc generate --experimental # Build the ZIP files that are embedded in the FTL release binaries build-zips: build-kt-runtime @@ -47,19 +48,19 @@ build-zips: build-kt-runtime # Rebuild frontend build-frontend: npm-install - mktg {{FRONTEND_OUT}} : frontend/src -- "cd frontend && npm run build" + mk {{FRONTEND_OUT}} : frontend/src -- "cd frontend && npm run build" # Build the Kotlin runtime (if necessary) build-kt-runtime: mkdir -p $(dirname {{KT_RUNTIME_RUNNER_TEMPLATE_OUT}}) - mktg {{KT_RUNTIME_OUT}} : kotlin-runtime/ftl-runtime -- mvn -f kotlin-runtime/ftl-runtime -Dmaven.test.skip=true -B install + mk {{KT_RUNTIME_OUT}} : kotlin-runtime/ftl-runtime -- mvn -f kotlin-runtime/ftl-runtime -Dmaven.test.skip=true -B install install -m 0600 {{KT_RUNTIME_OUT}} {{KT_RUNTIME_RUNNER_TEMPLATE_OUT}} - mktg {{RUNNER_TEMPLATE_ZIP}} : {{KT_RUNTIME_RUNNER_TEMPLATE_OUT}} -- "cd build/template && zip -q --symlinks -r ../../{{RUNNER_TEMPLATE_ZIP}} ." + mk {{RUNNER_TEMPLATE_ZIP}} : {{KT_RUNTIME_RUNNER_TEMPLATE_OUT}} -- "cd build/template && zip -q --symlinks -r ../../{{RUNNER_TEMPLATE_ZIP}} ." # Install Node dependencies npm-install: - mktg frontend/node_modules : frontend/package.json frontend/src -- "cd frontend && npm install" + mk frontend/node_modules : frontend/package.json frontend/src -- "cd frontend && npm install" # Regenerate protos build-protos: npm-install - mktg {{SCHEMA_OUT}} : backend/schema -- "ftl-schema > {{SCHEMA_OUT}} && buf format -w && buf lint && cd backend/protos && buf generate" \ No newline at end of file + mk {{SCHEMA_OUT}} : backend/schema -- "ftl-schema > {{SCHEMA_OUT}} && buf format -w && buf lint && cd backend/protos && buf generate" \ No newline at end of file diff --git a/bin/.mktg-0.3.0.pkg b/bin/.mk-0.5.0.pkg similarity index 100% rename from bin/.mktg-0.3.0.pkg rename to bin/.mk-0.5.0.pkg diff --git a/bin/mk b/bin/mk new file mode 120000 index 0000000000..b7eb922c34 --- /dev/null +++ b/bin/mk @@ -0,0 +1 @@ +.mk-0.5.0.pkg \ No newline at end of file diff --git a/bin/mktg b/bin/mktg deleted file mode 120000 index 30b31f6b0f..0000000000 --- a/bin/mktg +++ /dev/null @@ -1 +0,0 @@ -.mktg-0.3.0.pkg \ No newline at end of file