Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4e6025

Browse files
authored
fix: Use "make build" on deploy (#1261)
This was a missed item in #1259.
1 parent dacc025 commit e4e6025

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.github/workflows/coder.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ jobs:
355355
js-${{ runner.os }}-
356356
357357
- name: Build Release
358-
run: make release
358+
run: make build
359359

360360
- uses: actions/upload-artifact@v3
361361
with:

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
.DEFAULT_GOAL := build
2+
13
INSTALL_DIR=$(shell go env GOPATH)/bin
24
GOOS=$(shell go env GOOS)
35
GOARCH=$(shell go env GOARCH)
46

5-
# First target is the default for `make`.
6-
build: dist
7+
bin: $(shell find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
8+
@echo "== This builds binaries for command-line usage."
9+
@echo "== Use \"make build\" to embed the site."
10+
goreleaser build --snapshot --rm-dist --single-target
11+
12+
build: dist/artifacts.json
713
.PHONY: build
814

915
# Runs migrations to output a dump of the database.
@@ -14,9 +20,8 @@ coderd/database/dump.sql: $(wildcard coderd/database/migrations/*.sql)
1420
coderd/database/querier.go: coderd/database/dump.sql $(wildcard coderd/database/queries/*.sql)
1521
coderd/database/generate.sh
1622

17-
# This is called "dist" to target the output directory for binaries.
18-
dist: site/out $(find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
19-
goreleaser build --snapshot --rm-dist
23+
dist/artifacts.json: site/out $(shell find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
24+
goreleaser release --snapshot --rm-dist --skip-sign
2025

2126
fmt/prettier:
2227
@echo "--- prettier"
@@ -30,6 +35,7 @@ endif
3035

3136
fmt/terraform: $(wildcard *.tf)
3237
terraform fmt -recursive
38+
.PHONY: fmt/terraform
3339

3440
fmt: fmt/prettier fmt/terraform
3541
.PHONY: fmt

docs/CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ Coder requires Go 1.18+, Node 14+, and GNU Make.
99

1010
Use the following `make` commands and scripts in development:
1111

12-
- `make bin` builds binaries
12+
- `make build` compiles binaries and release packages
1313
- `make install` installs binaries to `$GOPATH/bin`
1414
- `make test`
15-
- `make release` dry runs a new release
1615
- `./develop.sh` hot reloads for front-end development
1716

1817
## Styling

0 commit comments

Comments
 (0)