fix: Use "make build" on deploy (#1261)

This was a missed item in https://github.com/coder/coder/pull/1259.
This commit is contained in:
Kyle Carberry
2022-05-02 14:04:45 -05:00
committed by GitHub
parent dacc025cf3
commit e4e60256ac
3 changed files with 13 additions and 8 deletions

View File

@ -355,7 +355,7 @@ jobs:
js-${{ runner.os }}- js-${{ runner.os }}-
- name: Build Release - name: Build Release
run: make release run: make build
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:

View File

@ -1,9 +1,15 @@
.DEFAULT_GOAL := build
INSTALL_DIR=$(shell go env GOPATH)/bin INSTALL_DIR=$(shell go env GOPATH)/bin
GOOS=$(shell go env GOOS) GOOS=$(shell go env GOOS)
GOARCH=$(shell go env GOARCH) GOARCH=$(shell go env GOARCH)
# First target is the default for `make`. bin: $(shell find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
build: dist @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 .PHONY: build
# Runs migrations to output a dump of the database. # 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/querier.go: coderd/database/dump.sql $(wildcard coderd/database/queries/*.sql)
coderd/database/generate.sh coderd/database/generate.sh
# This is called "dist" to target the output directory for binaries. dist/artifacts.json: site/out $(shell find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
dist: site/out $(find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum goreleaser release --snapshot --rm-dist --skip-sign
goreleaser build --snapshot --rm-dist
fmt/prettier: fmt/prettier:
@echo "--- prettier" @echo "--- prettier"
@ -30,6 +35,7 @@ endif
fmt/terraform: $(wildcard *.tf) fmt/terraform: $(wildcard *.tf)
terraform fmt -recursive terraform fmt -recursive
.PHONY: fmt/terraform
fmt: fmt/prettier fmt/terraform fmt: fmt/prettier fmt/terraform
.PHONY: fmt .PHONY: fmt

View File

@ -9,10 +9,9 @@ Coder requires Go 1.18+, Node 14+, and GNU Make.
Use the following `make` commands and scripts in development: 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 install` installs binaries to `$GOPATH/bin`
- `make test` - `make test`
- `make release` dry runs a new release
- `./develop.sh` hot reloads for front-end development - `./develop.sh` hot reloads for front-end development
## Styling ## Styling