Skip to content

fix: Use "make build" on deploy #1261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ jobs:
js-${{ runner.os }}-

- name: Build Release
run: make release
run: make build

- uses: actions/upload-artifact@v3
with:
Expand Down
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"
Expand All @@ -30,6 +35,7 @@ endif

fmt/terraform: $(wildcard *.tf)
terraform fmt -recursive
.PHONY: fmt/terraform

fmt: fmt/prettier fmt/terraform
.PHONY: fmt
Expand Down
3 changes: 1 addition & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down