From 98c492fcab28146b526a07fac8476b05d7e2adc1 Mon Sep 17 00:00:00 2001 From: kylecarbs Date: Mon, 2 May 2022 18:32:09 +0000 Subject: [PATCH] fix: Use "make build" on deploy This was a missed item in https://github.com/coder/coder/pull/1259. --- .github/workflows/coder.yaml | 2 +- Makefile | 16 +++++++++++----- docs/CONTRIBUTING.md | 3 +-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 25cab97a479a7..c220da2d926a9 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -355,7 +355,7 @@ jobs: js-${{ runner.os }}- - name: Build Release - run: make release + run: make build - uses: actions/upload-artifact@v3 with: diff --git a/Makefile b/Makefile index e0adde8a2682e..e310af5747c17 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,15 @@ +.DEFAULT_GOAL := build + INSTALL_DIR=$(shell go env GOPATH)/bin GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) -# First target is the default for `make`. -build: dist +bin: $(shell find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum + @echo "== This builds binaries for command-line usage." + @echo "== Use \"make build\" to embed the site." + goreleaser build --snapshot --rm-dist --single-target + +build: dist/artifacts.json .PHONY: build # Runs migrations to output a dump of the database. @@ -14,9 +20,8 @@ coderd/database/dump.sql: $(wildcard coderd/database/migrations/*.sql) coderd/database/querier.go: coderd/database/dump.sql $(wildcard coderd/database/queries/*.sql) coderd/database/generate.sh -# This is called "dist" to target the output directory for binaries. -dist: site/out $(find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum - goreleaser build --snapshot --rm-dist +dist/artifacts.json: site/out $(shell find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum + goreleaser release --snapshot --rm-dist --skip-sign fmt/prettier: @echo "--- prettier" @@ -30,6 +35,7 @@ endif fmt/terraform: $(wildcard *.tf) terraform fmt -recursive +.PHONY: fmt/terraform fmt: fmt/prettier fmt/terraform .PHONY: fmt diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 322b7f9aaf198..0658262128fc6 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -9,10 +9,9 @@ Coder requires Go 1.18+, Node 14+, and GNU Make. Use the following `make` commands and scripts in development: -- `make bin` builds binaries +- `make build` compiles binaries and release packages - `make install` installs binaries to `$GOPATH/bin` - `make test` -- `make release` dry runs a new release - `./develop.sh` hot reloads for front-end development ## Styling